Convert all numerals in a Pages document to superscript
What's the easiest way to convert all numerals in a Pages document to superscript?
Mac mini, macOS 10.15
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
What's the easiest way to convert all numerals in a Pages document to superscript?
Mac mini, macOS 10.15
There is no capability in Pages to automatically convert numbers into superscripts, either via Find/Replace, or via AppleScript. What you can do is export the Pages document to a Word .docx document, and then open it in LibreOffice Writer.
The Find/Replace facility in LibreOffice Writer is robust, and will allow you to use Regular Expressions to Find all numbers, and replace them with their superscript counterpart. Mash a button, get a result. Save that changed Word document, and then reopen in Pages allowing it to be translated back into Pages .pages document format.
Here is my starting text as shown in LibreOffice Writer 6.4.4:
Here is the Find/Replace panel:
Notice that I have selected Regular Expression, and have used (\d+) to find any digit(s) and place them in a capture group. The $1 in the Replace field will be the respective captured number, which will then receive automatic superscript applied to it. I configure automatic superscript in the Format… panel as shown below:
One then selects Find All and all of the numbers light up, and then Replace All makes all of the numbers superscript, while preserving their font color.
After the replacement:
And after it is opened in Pages 10, you will see that Pages uses a different baseline shift that moves the LibreOffice superscripts downward.
There is no capability in Pages to automatically convert numbers into superscripts, either via Find/Replace, or via AppleScript. What you can do is export the Pages document to a Word .docx document, and then open it in LibreOffice Writer.
The Find/Replace facility in LibreOffice Writer is robust, and will allow you to use Regular Expressions to Find all numbers, and replace them with their superscript counterpart. Mash a button, get a result. Save that changed Word document, and then reopen in Pages allowing it to be translated back into Pages .pages document format.
Here is my starting text as shown in LibreOffice Writer 6.4.4:
Here is the Find/Replace panel:
Notice that I have selected Regular Expression, and have used (\d+) to find any digit(s) and place them in a capture group. The $1 in the Replace field will be the respective captured number, which will then receive automatic superscript applied to it. I configure automatic superscript in the Format… panel as shown below:
One then selects Find All and all of the numbers light up, and then Replace All makes all of the numbers superscript, while preserving their font color.
After the replacement:
And after it is opened in Pages 10, you will see that Pages uses a different baseline shift that moves the LibreOffice superscripts downward.
Nice! Thanks!!
You are welcome.
Convert all numerals in a Pages document to superscript