From - OOoLatex:
- OOoLatex is a set of macros designed to bring the power of LaTeX into OpenOffice. It contains two main modules: the first one, Equation, allows to insert LaTeX equations into Writer and Impress documents as png or emf images while the second one, Expand, can be used for simpler equations to expand LaTeX code into appropriated symbol characters and insert them as regular text.
The macro is especially useful for the preparation of presentations with a lot of mathematical formula. Instead of using beamer class in LaTex, one can enjoy the flexibility of Impress in organizing texts and graphs while at the same time harnish the power LaTex in typesetting and inserting formula.
OOoLatex in Arch Linux
This article explains how to install OOoLatex for Arch Linux, assuming one has a working Latex system and Ghostscript package installed.
The easiest way to obtain OOoLatex macro package is from the - project's website. Select the package according to the system architecture. Open the "oxt" file with OpenOffice or LibreOffice, the extension manager should take care of the rest.
To render the equations correctly, one must have the required fonts installed in the system. The collection of fonts is available from the project website under the name OOoLatexFonts.zip.
To install the fonts, follow the wiki guide on fonts. For example, a system-wide installation (available for all users) can be performed by unzipping and moving the fonts folder to the Template:Filename directory.
Then one needs to update the font cache: (from within the fonts folder)
# fc-cache -vf
EMF format allows a better rendering of the equations by the use of scalable graphics. It performs much better than a png rendition and is strongly recommended for serious works.
To enable the EMF support, one needs to install the latex2emf binary. The binary is again available in the project website. Select the right package according to the system architecture. Note that the package "latex2emf_Linux_i386_binary.tar.gz" is equally useful for both i386 and 64 bits users. One can also compile from source by selecting the "OOoLatexEmf_noarch_src.tar.gz" package.
Unzip the file and perform the installation by running (as root or sudo) the install.sh script:
# sudo ./install.sh
Another important dependency for the support is the "libstdc++5" package. To install:
# pacman -S libstdc++5
For 64 bit users, in addition to the above package, one also needs
# pacman -S lib32-libstdc++5
After installation, one can start the macro by choosing Tools > Macros... > Run Macros and selects the required routine from within a document. Also, an OOoLatex toolbar should be available which allows easy insertion of equations. (If it is not automatically enabled, check OOoLatex in View > Toolbars > OOoLatex.)
To successfully compile the latex code, one needs to supply the paths to latex and ghostscript (gs) binaries to OOoLatex in the "Config" tab. The usual location for both of these are in
One can invoke the Macro by selecting the "Equation" tab in the toolbar. The module transform the relevant LaTeX code into a graphical image. For the graphical image, one can choose between ".png" and ".emf". The ".emf" format is more preferrable in that it is scalable, instead of pixelized image in the case of ".png".
Start by typing
F = ma
with "display" type in the "Equation" module. Press "Latex" to run the code. The resultant image should scale nicely if one chooses "emf" as output format.
For more information on how to use the macro, consult the - project's website.