Re: Help
Re: Help
- Subject: Re: Help
- From: Christopher Nebel <email@hidden>
- Date: Fri, 30 May 2008 15:31:00 -0700
On May 28, 2008, at 10:25 PM, Curt Hanson wrote:
I have never used scripts and do not know if I should be sending
this. But, I need help.
Long ago I used Microsoft Works 3 and the font Princeton to do my
teaching of science and math.
Princeton was great as it allowed me to type sub and superscripts
without using a menu.
But, that was pre OS X.
Now I am trying to convert my documents to pages.
All my sub and superscripts have changed to nonsense symbols.
I have tried 'find/replace' but I cannot put sub or superscripts in
the replace part.
It seems that I will have to change each one individually which
would take me months.
Can I use an apple script to simplify my problem??
I'm fond of TeX myself -- I used to use it to do my math homework --
but that's a fairly heavy-weight solution to the immediate problem.
Fonts like Princeton are rare these days mostly because of problems
like this one -- the document winds up looking totally different to
someone who doesn't have the right font. There are (at least) two
direct non-scripting solutions: the formatting way and the cheap and
sleazy way.
First, the formatting way: Pages, at least as of 3.0, can in fact
apply a particular style to the "replace" text, but you have to define
it as a character style first. To define the character style, make a
subscripted number: type a "1", select it, and pick Format > Font >
Baseline > Subscript. Then, show the Styles drawer (View > Show
Styles Drawer), and pick Create New Character Style From Selection
from the menu in the Character Styles section, and give it a name
("Subscript"). (Optionally, twist open the "Include character styles"
bit in the creating dialog, and uncheck the boxes for the attributes
you don't care about, which is probably everything except the
Subscript one.) Now, to replace the characters: find a gibberish-ized
subscript "1", select it, Find > Use Selection For Find, Find >
Find..., switch to the Advanced tab, and in the replacement section,
type "1" and pick "Subscript" for the style. Replace All, and now
you've done all the subscript "1"s; repeat 9 more times for the other
digits.
Next, the cheap and sleazy way: Unicode has sub- and superscripted
numeral characters, so if you're using a Unicode-capable editor (like
Pages, but also including Mail and TextEdit), then you can type stuff
like this: H₂SO₄. Neat, eh? This means you're dealing with a
simple find-and-replace, it's just a matter of typing the subscripted
characters. Pick Edit > Special Characters..., pick View: Roman, the
By Category tab, and then the Digits category, and they're down at the
5th and 6th row. Double click one to "type" it. You have less
control over the formatting this way, but the text can be moved to
lots of places and still keep the subscripts intact.
Now, if you need to do this to a significant number of documents, then
scripting the process could help significantly. You have to decide if
the time it will take you to learn how to automate it is less than the
time it will take you do the whole thing by hand.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >Help (From: Curt Hanson <email@hidden>) |