Status: maintained; 2007-2008, 2020
SuperbChemistry is an extension for OpenOffice and LibreOffice that applies superscript and subscript formatting to chemical formulas in bulk. (The name comes from "super" and "sub".) For example, if you run it on a portion of your document that contains "SO42-", that text will be converted to "SO42−".
I originally wrote the extension in 2007. As of 2020-09-10, I have released version 3.0, which restores compatibility with modern versions of OpenOffice and LibreOffice and has other significant enhancements. I tested it successfully in libreoffice-6.4.6.2-1.fc32 (Fedora 32) and an upstream build of OpenOffice 4.1.7. Your feedback and contributions are welcome. I don't have any plans for further development of the extension at this time, but I will consider making enhancements if there is significant demand.
SuperbChemistry has pages on the OpenOffice extensions site and the LibreOffice extensions site.
Installation: Download SuperbChemistry-VERSION.oxt
below.
Then, in the application, go to "Tools" -> "Extension Manager" -> "Add" and browse for the file.
Finally, restart the application if you have not already been prompted to do so.
To upgrade, remove the old version and then install the new one.
Usage: In Writer, go to "Tools" -> "Add-Ons" (at the bottom) -> "SuperbChemistry: Format selection or document". If you have selected some text, this will format the selection, otherwise it will format the whole document.
SuperbChemistry uses heuristics to guess what is intended to be a chemical formula and whether digits represent a quantity of an atom or group or a charge amount. (See the readme in the source repository for details.) If it makes a mistake, you must manually correct the formatting (or use the "undo" command to undo the entire formatting pass) and then do one of the following:
I was inspired to write SuperbChemistry after the tedium of manually formatting chemical formulas in a two-page report for a high-school chemistry class, but I am not a chemistry expert and have never used the extension for real work, so I welcome reports of real cases on which SuperbChemistry guesses wrong and will see if I can fix them without breaking other cases (subject to available time, as with anything).
SuperbChemistry-test.odt
is a test suite of sorts with chemical formulas that exercise most of the cases of the formatting algorithm.
Here is the source repository.
File | Size | Modification time |
---|---|---|
SuperbChemistry-3.1.oxt | 6289 | 2022-10-15 18:32:49 +0000 |
SuperbChemistry-3.0.oxt | 6067 | 2020-09-10 17:11:28 +0000 |
SuperbChemistry-2.2.uno.pkg | 3822 | 2008-10-27 03:54:49 +0000 |
SuperbChemistry-2.1.uno.pkg | 2797 | 2007-02-06 01:21:05 +0000 |
SuperbChemistry-2.uno.pkg | 2738 | 2007-02-06 00:57:25 +0000 |
SuperbChemistry-1.uno.pkg | 2140 | 2007-02-05 00:38:04 +0000 |