Find and Replace - Subscripts

How do I replace a character with a subscripted value? I have happily written twenty or so pages with expressions like CO2, CH4 and N2O thinking I'll simply do a global find and replace when I finish. However, it seems that the Find and Replace window does not accept the various options under 'baseline' in the Format > Font. Is this correct and is there a workaround other than the obvious long slog!

Tim

PowerMac G4, iBook G4, Mac OS X (10.4.11)

Posted on Jan 11, 2008 6:31 AM

Reply
6 replies

Jan 11, 2008 7:27 AM in response to Tim Simmons2

Tim,

Like you I am surprised that the Replace field won't accept (or retain) formatted text. I think that you are still ahead of where you would have been if you had taken the time to subscript (CTRL-Command-Minus) every subscript character as you composed your work. At this point I would use Find only, and taking one compound at a time, find the first occurrence and fix it. Then copy the corrected form (Command-C). Using Find to get to each additional occurrence, Paste (Command-V) the correct term and go on to the next.

I'll join you in submitting Feedback to Apple.

Jerry

Jan 11, 2008 8:19 AM in response to Tom Gewecke

Many thanks to Tom and Jerrold. I was a little bemused as to how I was going to insert the Unicode code in the F&R window. Then I thought of the character palette and sure enough there is a table there which deals specifically with sub and superscripts. I opened the F&R box in Pages and dragged the subscript to the replace text. This worked well subject to another googly thrown by Pages.

I had five or ten cases of CO2 correctly formatted but Pages wanted to change these as well but I had it on a tight leash. Also I note that the font of the subscript differs slightly from that used by Pages when one subscripts the usual way.

Well you can't win them all. I am sure I'll converge on a full solution.

Thanks again.
Tim

Jan 11, 2008 10:19 AM in response to Tim Simmons2

Tim,

Thanks for coming back with the explanation of how you solved the problem. In most cases, and this is certainly one of them, when I jump in and try to contribute, I learn something before the process is over.

I'm curious how Tom came to his understanding that Unicode would be recognized in the Find and Replace function when the "normal" shifted text would not.

The Find field seems to have the same character code sensitivity, or lack thereof, as the Replace field, so that's apparently why Pages didn't differentiate between text that you originally entered with and without subscript formatting.

Regards,

Jerry

Jan 11, 2008 10:48 AM in response to Jerrold Green1

I'm curious how Tom came to his understanding that Unicode would be recognized in the Find and Replace function when the "normal" shifted text would not.


As I understand it, find/replace functions normally work with characters that can be defined by Unicode code points. So if you wanted to change some kind of formatting that is achieved by other means, you would probably have to do the operation on the "source" for your text, using the proper markup. For example, to create subscripts in a web page, you could open the html source and replace the numbers by <sub>number</sub>. What a similar operation would exactly involve with Pages I don't know offhand.

Jan 11, 2008 11:19 AM in response to Tom Gewecke

Hello

At this time, as far as I know, the format of the XML files created by Pages is not documented so, making changes in them the brute force way may be unsafe.

Here is an extract from such a file:

<sf:span sf:style="SFWPCharacterStyle-7">I had five or ten cases of CO</sf:span><sf:span sf:style="SFWPCharacterStyle-8">2</sf:span><sf:span sf:style="SFWPCharacterStyle-7"> correctly formatted but Pages</sf:span>

"I had five or ten cases of CO" is in plain Lucida Grande

"2" is in Pages's superscript format

" correctly formatted but Pages" is back to plain Lucida Grande

Without the superscript setting, it would be:

<sf:span sf:style="SFWPCharacterStyle-7">I had five or ten cases of CO2 correctly formatted but Pages</sf:span>


So it appears that it would be necessary to replace the single "2" by

</sf:span><sf:span sf:style="SFWPCharacterStyle-8">2</sf:span><sf:span sf:style="SFWPCharacterStyle-7">

Which is not guaranteed to be OK because the style of the original string may be an other one than
"SFWPCharacterStyle-7"

Of course, users may wish to play with fire but I will not do that.

Yvan KOENIG (from FRANCE vendredi 11 janvier 2008 20:19:18)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Find and Replace - Subscripts

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.