|
Fraction |
|
2000.04.28 |
http://www.barefeetware.com/appleworks/fraction/ |
|
Description |
This AppleWorks script formats the selected text as a fraction, if it contains a slash / character. |
|
Enhancement |
This is one of 40 scripts in the Enhancement Pack for AppleWorks. |
|
Detail
The Format Fraction item is in the Text sub-menu of AppleWorks Scripts Menu.Sample
Select a fraction containing a slash "/" character and run this script. The numerator is formatted as "superior", the slash is replaced with the "Ú" (shift-option-1) character and the denominator is set to half the font size.
Before:Advanced
After:
Operates on the selected text in a word processing document or text frame.Download
This script works with AppleWorks 6 and AppleWorks 5.
Only registered users are permitted to use the supplied files after 14 days or edit them.
This script is included in the Enhancement Pack for AppleWorks, not supplied separately.Scripting
This script is editable. Some significant lines of code are:© 2000 BareFeetWare
set slashPosition to my CharacterOffset("/", theText)
-- slash
set character slashPosition in textRef to "Ú" -- shift-option-1
-- denominator
tell text (slashPosition + 1) thru -1 in textRef
set oldSize to size
set size to oldSize / 2
end tell