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
Pack

 

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.

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.

Sample
Before:

After:


Advanced


Requirements
Operates on the selected text in a word processing document or text frame.

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.

Download
This script is included in the Enhancement Pack for AppleWorks, not supplied separately.

Scripting
This script is editable. Some significant lines of code are:

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


© 2000 BareFeetWare

Please email us any queries about this page.