Difference between revisions of "OOoLatex"
|Line 9:||Line 9:|
The easiest way to obtain OOoLatex macro package is from the [http://ooolatex.sourceforge.net/ - 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
The easiest way to obtain OOoLatex macro package is from the [http://ooolatex.sourceforge.net/ - 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.
Revision as of 17:20, 23 October 2011
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/jpeg 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
After installation, try <Control>+M and <Control>+K (the default shortcuts). You can also add the OOoLatex Toolbar: View > Toolbars > OOoLatex
The module Equation transform a LaTeX code into an image. Two formats are proposed: .png and .emf. You probably know PNG, this is a kind of "normal" image. If you rescale it, you'll see pixel. A way to circumvent this problem is to increase the resolution (dpi) but you'll get larger files! Or to use the EMF format which is a scalable image: the equation is vectorised and don't loose resolution when you rescale it! This is probably the better choice but you need then some binaries (see above). Selecting an equation and opening the equation dialog box allows editing of the equation.
The module Expand was first called Inline in the first versions of OOoLatex. Basically, it transforms (expands) the LaTeX special characters into ones that are usable by OpenOffice. This is done (partly) via the STIX general fonts. The interests of Expand is to include LaTeX characters directly in a sentence without requiring the insertion of an image (as in Equation). Evidently, not all LaTeX code can be expanded (e.g. a fraction bar with something above and under is not a character!), that's why a list is offered in the dialog box.