Matt McCutchen's Web SiteSuperbChemistry for LibreOffice  (Top, Installation and usage, Download, Version log, Bottom).  Email me about this page.

SuperbChemistry for OpenOffice / LibreOffice

Status: maintained; 2007-2008, 2020 (supersedes any conflicting remarks left on this page; see the home page for definitions)

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 and usage[# Top]

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.

Download[# Top]

Here is the source repository.

FileSizeModification time
SuperbChemistry-3.1.oxt62892022-10-15 18:32:49 +0000
SuperbChemistry-3.0.oxt60672020-09-10 17:11:28 +0000
SuperbChemistry-2.2.uno.pkg38222008-10-27 03:54:49 +0000
SuperbChemistry-2.1.uno.pkg27972007-02-06 01:21:05 +0000
SuperbChemistry-2.uno.pkg27382007-02-06 00:57:25 +0000
SuperbChemistry-1.uno.pkg21402007-02-05 00:38:04 +0000

Version log[# Top]


Matt McCutchen's Web SiteSuperbChemistry for LibreOffice  (Top, Installation and usage, Download, Version log, Bottom).  Email me about this page.
Modification time of this page's main source file: 2022-10-15 18:36:35 +0000
Except where otherwise noted, Matt McCutchen waives his copyright to the content of this site.  This site comes with absolutely no warranty.  Why?