You are here

"Where Chemical Formulas Never Dared to Go" or "Numbers as superscripts/ subscripts in spreadsheets, databases, HyperCard


Henry R. Derr
Laramie County, Community College

Note: This article was scanned using OCR from the Spring 1992 CCCE Newsletter. Please contact us if you identify any OCR errors.
Which of th.e following chemical formulas do you find more pleasing to your eye:
(1) AI2(P04)3
(2) AI2(P04)3
if again you like (2) then stay tuned. Have you ever been working with a spreadsheet and wanted to place a chemical formula in a cell. and had to resort to version (1 ) I have, and every time I looked at it something in the back of my mind kept bothering me about it. How about a chemical database. The database applications out there do not generally support subscripting and superscripting of numbers. How about when you are using a word processor and you have to go though some kind of two or even three key sequence to activate the subscripting, you type your subscripts and then its another sequence to get back to normal text. If you have typed chemical formulas this way you know it can be a very tedious proposition.
I have found a way to type a subscripted 2 for example by holding down the option key and typing a 2. The technique is to use a font set which has the number already positioned as a superscript or subscript. Two different sets of modified Haber bitmapped fonts have been used. The font HaberDown will convert any number typed as normal text into a subscripted number. This has been primarily usefulĀ·in converting all our chemical formulas for our
inventory. The formulas are correctly. displayed and printed by just changing the font used for that field. HaberOSupOdown will display superscripted number by holding down the Option-Shift key combination and typing the number. A subscripted number is entered by holding down the Option key and typing the number.
The font set was prepared by modifying an existing font using ResEdit. Using ResEdit(available from most Mac retailers or Mac user groups), additional character types can be added or modified to suit individual needs. Characters such as those shown below can be produced using a single key stroke.

02/11/92 to 02/15/92