by David K. Levine
Jex is an equation editor designed to insert, edit and convert equations
in LibreOffice. It is similar to the Design Sciences
Mathtype editor, a version of which also ships as the default
editor with Microsoft Word. Installation
and downloads are below. Jex
a wysywig editor that supports TeX. It reads and writes TexMath
equations. It can read Mathtype equations on any LibreOffice/java
supported platform (Linux, for example). (Warning: after importing an
msword document into LibreOffice you must first save it in .odt format for this to work.)
Jex was written in 2002-2003 and never produced very good looking equations in Open/Libre office due to fact that at that time the only way I could figure out how to do it was to insert "hand coded" windows meta-files. Over the years many bugs crept in and new versions of Open/Libre office broke existing functionality. Recent versions of Libreoffice finally provide decent support for the svg vector graphics format and Roland Baudin built a version of TexMaths and Martin Gieseking added to dvisvgm the ability to produce scalable "font-free" TeX fonts from DVI files. The result are scalable - including in pdf - equations in Libreoffice that look good. I patched TexMath so that Baudin's code can be used by Jex, and Jex now inserts nice looking TexMath equations into Libreoffice. I also fixed the bugs and rounded out the functionality so that Jex is now usable and useful for the first time in many years. In the process I simplified the installation a great deal.
Downloads: Stable Binary(old version 12) Latest Binary(version 199) . Installation zipfile. (Note that the jar files contain the source code along with the executables.) If you use the stable version, you should rename jex-stable.jar to jex.jar.
Copyright: Stable version 9 and current version 85 and earlier are placed in the public domain. All subsequent versions are released under the GPL version 2.
insert a new equation in LibreOffice, click the Jex button. To edit an
existing equation, select it, and click the Jex button. In both cases a
Jex window will open. The first
time Jex runs it will take a while to load, so be patient. However,
even when all Jex windows are closed, Jex will remain running until
LibreOffice closes, so subsequent window openings will be reasonably
fast. (If you wish to bypass this for some reason use the "Immediate
Shutdown" option on the File menu.)
In addition to opening Jex equations, Jex can open and edit
Mathtype equations. The document must be saved in .odt format. If you
cut and paste any mathtype equations you must save the document before
you can read it using Jex. WARNING: when
you save the equation back to the document it will be saved in TexMaths
format and not in Mathtype format. At this time there is no capability
of writing Mathtype compatible equations. NOTE: Jex reads the Mathtype
object information directly from the .odt file which is why you must
save it in that format before you can edit it.
Equation editing uses keystroke bindings similar to Mathtype or Scientific Workplace; in particular control-j inserts a sub/superscript and control-g make the next character greek. You can find a complete list of keyboard accelerators under the help menu. To insert something into the "User" menu, copy it to the clipboard, then click on the target using any mouse button except the usual one.
When you are done editing your equation, save it, or use the ctrl-m keystroke accelerator from within Jex to save the equation and close the window. If you are editing an equation, the "save" operation replaces the equation in Openoffice with your edited equation. Otherwise the new equation is inserted at the cursor in Openoffice.
Jex speaks a dialect of both MathML and of LaTex. LaTex is the
default format. The paste operation will read the clipboard to
determine if it contains TeX or MathML. You can also type TeX directly
into equations by hitting \ in the editor. Be aware that hitting the
space key will insert your TeX and exit TeX mode. You can also type _ to get a sub(and super)script. Exactly what LaTex is
and is not supported by Jex is documented here.
MathML support is
"more experimental" than TeX support as well as incomplete, and is not documented. Jex
can be used to convert from
supported TeX to MathML and vice versa, and from Mathtype to both
formats, but conversion into Mathtype format is not supported.
Compiling: The source files are contained in the jar file. To compile, change the .jar extension to .zip and unzip the file (in Linux you can just open the .jar file directly with the Archive Manager). The java files should be in a directory called jex, the images in a subdirectory of that directory called images. The supporting jar files in jex-install.zip must be in your class path. From the superdirectory of the jex directory issue the command javac jex/Jex.java. You can then run the program by java jex/Jex and put it in a jar file using jar jar cvfm jex.jar jex/jmainclass.txt jex. If you want to make modifications, it would be useful if you changed the data in ver.txt to show that this is a different version.
The jex-install.zip contains the necessary java support
openoffice needed to control openoffice from Java. They are
probably already installed on your system but are a pain to locate, so
have provided a set of copies and bound the Jex jar file to copies that are
in the same directory as the jar file.