SuperbChemistry is an OpenOffice.org macro extension I wrote to add superscript and subscript formatting to chemical formulas in Writer documents. (The name comes from "super" and "sub".) You type SO42- and the macro converts it to SO42−. Briefly:
For much more information, read the comment at the top of the macro module, which you can download separately below or open from within OpenOffice.org (go to Tools -> Macros -> Organize Macros -> OpenOffice.org Basic..., select My Macros -> SuperbChemistry -> Main, and click Edit).
Note (2008-11-08): Someone reported an error installing SuperbChemistry 2.2 in OpenOffice.org 3.0, but I could not reproduce the problem. If you have trouble installing SuperbChemistry as an extension, you can always manually create a macro module (Tools -> Macros -> Organize Macros -> OpenOffice.org Basic, select "My Macros -> Standard", click "New") and paste in the code from SuperbChemistry-V-module.txt.
SuperbChemistry-V-test.odt is a test suite of sorts with chemical formulas that exercise all the cases of the formatting algorithm.
| File | Size | Modification time |
|---|---|---|
| SuperbChemistry-2.2.uno.pkg | 3822 | 2008-10-26 23:54:49 -0400 |
| SuperbChemistry-2.2-module.txt | 5710 | 2008-10-27 15:50:14 -0400 |
| SuperbChemistry-2.2-test.odt | 8247 | 2008-10-26 23:47:57 -0400 |
| SuperbChemistry-2.1.uno.pkg | 2797 | 2007-02-05 20:21:05 -0500 |
| SuperbChemistry-2.1-test.odt | 7613 | 2007-02-05 20:20:38 -0500 |
| SuperbChemistry-2.uno.pkg | 2738 | 2007-02-05 19:57:25 -0500 |
| SuperbChemistry-2-test.odt | 7642 | 2007-02-05 19:58:25 -0500 |
| SuperbChemistry-1.uno.pkg | 2140 | 2007-02-04 19:38:04 -0500 |
| SuperbChemistry-1-test.odt | 7408 | 2007-02-04 18:56:19 -0500 |
SuperbChemistry is also available on the OOo extensions site.
ChemFormula is a similar tool for Microsoft Word.