:''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. ''

:''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.

+

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 harness the power of LaTeX in typesetting and inserting equations.

==OOoLatex in Arch Linux==

==OOoLatex in Arch Linux==

Line 11:

Line 11:

==Installation==

==Installation==

−

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. Then, open the "oxt" file with OpenOffice or LibreOffice, the extension manager should take care of the rest.

==Fonts==

==Fonts==

−

To render the equations correctly, one must have the required fonts installed in the system. The collection of fonts is available from the [http://ooolatex.sourceforge.net/- project website] under the name OOoLatexFonts.zip.

+

To render the equations correctly, one must have the required fonts installed in the system. The collection of fonts is available from the [http://sourceforge.net/projects/ooolatex/files/latest/download?source=files- 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 {{Filename|/usr/share/fonts/}} directory.

+

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 {{ic|/usr/share/fonts/}} directory.

Then one needs to update the font cache: (from within the fonts folder)

Then one needs to update the font cache: (from within the fonts folder)

Line 23:

Line 23:

==EMF support==

==EMF support==

−

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.

+

EMF format allows better rendering of the equations by the use of scalable graphics. It performs much better than a "png" rendition and the resultant image can be re-sized without compromising visual quality.

−

To enable the EMF support, one needs to install the latex2emf binary. The binary is again available in the [http://ooolatex.sourceforge.net/- 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.

+

For the EMF option to work, it is particularly important to install the "libstdc++5" dependency:

−

−

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

# pacman -S libstdc++5

−

+

For 64 bit users, in addition to the above package, one also needs

For 64 bit users, in addition to the above package, one also needs

Line 57:

Line 51:

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.

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 [http://ooolatex.sourceforge.net/ - project's website].

+

For more information on how to use the macro, consult the [http://ooolatex.sourceforge.net/ project's website].

Revision as of 11:54, 14 August 2012

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 harness the power of LaTeX in typesetting and inserting equations.

Contents

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.

Installation

The easiest way to obtain OOoLatex macro package is from the project's website. Select the package according to the system architecture. Then, open the "oxt" file with OpenOffice or LibreOffice, the extension manager should take care of the rest.

Fonts

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 /usr/share/fonts/ directory.

Then one needs to update the font cache: (from within the fonts folder)

# fc-cache -vf

EMF support

EMF format allows better rendering of the equations by the use of scalable graphics. It performs much better than a "png" rendition and the resultant image can be re-sized without compromising visual quality.

For the EMF option to work, it is particularly important to install the "libstdc++5" dependency:

# pacman -S libstdc++5

For 64 bit users, in addition to the above package, one also needs

# pacman -S lib32-libstdc++5

Initial setup

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

# /usr/bin

Usage

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.