Difference between revisions of "Ooolatex"

From ArchWiki
Jump to: navigation, search
(Installation)
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[Category:Mathematics and science]]
 +
[[Category:TeX]]
 
From [http://ooolatex.sourceforge.net/ - OOoLatex]:
 
From [http://ooolatex.sourceforge.net/ - 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. ''
 
:''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 9: 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. Opening 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]]  
+
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)
  
mkdir OOoLatexFonts
+
# fc-cache -vf
cd OOoLatexFonts
+
wget http://mesh.dl.sourceforge.net/sourceforge/ooolatex/OOoLatexFonts.zip
+
unzip OOoLatexFonts.zip
+
cd ..
+
sudo mv OOoLatexFonts /usr/share/fonts/truetype/.
+
sudo fc-cache -f /usr/share/fonts/truetype
+
  
The last step may take a while before finishing
+
==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.
  
(Optionnal) Install binaries for EMF
+
For the EMF option to work, it is particularly important to install the "libstdc++5" dependency:
If you want to use emf format (i.e. scalable pictures of the equations ==> I recommend), you need one more dependency: the latex2emf program.The easiest way to install it is to grab the binaries directly from the OOoLatex website: http://sourceforge.net/project/showf...roup_id=150801
+
If you have Ubuntu i386 or 64bits choose latex2emf_Linux_i386_binary.tar.gz
+
If you have Ubuntu PPC choose latex2emf_Linux_PPC_binary.tar.gz
+
If you have something else, you'll need to compile from source (grab OOoLatexEmf_noarch_src.tar.gz)
+
  
Once downloaded, go to the directory where you've downloaded:
+
# pacman -S libstdc++5
Code:
+
 +
For 64 bit users, in addition to the above package, one also needs
  
tar -xzvf latex2emf_Linux_i386_binary.tar.gz
+
# pacman -S lib32-libstdc++5
cd latex2emf_Linux_i386_binary/
+
sudo ./install.sh
+
  
Install OOoLatex
+
==Initial setup==
And finally, you can now install the extension!! Remarks that if you're just upgrading the extension, you need only this final step! But first download the extension here:
+
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.)
http://sourceforge.net/project/showf...roup_id=150801
+
At the time of writing this post, the latest one was 4.0.0-beta2 --> file OOoLatex-4.0.0-beta-2-linux.oxt
+
  
There are two types of installation. The administrator one is useful when installing for a lot of users but each user is not allowed to modify the configuration (most notably the shortcuts), only root can do that. Therefore I recommend, for normal user, to install the single-user type. For each type ther are two ways to make the install:
+
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
  
    Terminal :
+
# /usr/bin
    Single-user
+
    Code:
+
  
    /usr/lib/openoffice/program/unopkg.bin add OOoLatex-4.0.0-beta-2-linux.oxt
+
==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".  
  
    Administrator
+
Start by typing
    Code:
+
  
    sudo /usr/lib/openoffice/program/unopkg.bin add --shared OOoLatex-4.0.0-beta-2-linux.oxt
 
 
    Graphical :
 
    Single-user:
 
    Open OpenOffice (writer or impress). Tools > Package Manager > Add > Select the oxt file you've downloaded
 
    Administrator:
 
    Not recommended, see terminal method
 
 
 
Note that you'll have to accept the licence.
 
 
Usage
 
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.
 
 
In summary: use Equation for ... equations and Expand for some in-text characters
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Make sure that fonts are installed, otherwise you will see only rectangles:
 
# pacman -S ttf-dejavu artwiz-fonts
 
 
Download the base for stable and/or beta and/or devel:
 
# pacman -S libreoffice
 
Since version 3.4.2rc1, LibreOffice has been split.  The install will give you a menu prompting for which components to install.  As the language pack for en-US is no longer included by default, you will need to install at least 1 language pack.  The default language is Afrikaans (because it is alphabetically the first provider of libreoffice-langpack), the previous default (en-US) is at number 22:
 
 
<pre>
 
<pre>
[user@home ~]# pacman -S libreoffice
+
F = ma
:: There are 11 members in group libreoffice:
+
:: Repository extra
+
  1) libreoffice-base  2) libreoffice-calc  3) libreoffice-common  4) libreoffice-draw
+
  5) libreoffice-gnome  6) libreoffice-impress  7) libreoffice-kde4  8) libreoffice-math
+
  9) libreoffice-sdk  10) libreoffice-sdk-doc  11) libreoffice-writer
+
 
+
Enter a selection (default=all):
+
resolving dependencies...
+
:: There are 103 providers available for libreoffice-langpack:
+
:: Repository extra
+
  1) libreoffice-af  2) libreoffice-ar  3) libreoffice-as  4) libreoffice-ast  5) libreoffice-be
+
  6) libreoffice-bg  7) libreoffice-bn  8) libreoffice-bo  9) libreoffice-br
+
  10) libreoffice-brx  11) libreoffice-bs  12) libreoffice-ca  13) libreoffice-ca-XV
+
  14) libreoffice-cs  15) libreoffice-cy  16) libreoffice-da  17) libreoffice-de
+
  18) libreoffice-dgo  19) libreoffice-dz  20) libreoffice-el  21) libreoffice-en-GB
+
  22) libreoffice-en-US  23) libreoffice-en-ZA  24) libreoffice-eo  25) libreoffice-es
+
  26) libreoffice-et  27) libreoffice-eu  28) libreoffice-fa  29) libreoffice-fi
+
  30) libreoffice-fr  31) libreoffice-ga  32) libreoffice-gl  33) libreoffice-gu
+
  34) libreoffice-he  35) libreoffice-hi  36) libreoffice-hr  37) libreoffice-hu
+
  38) libreoffice-id  39) libreoffice-is  40) libreoffice-it  41) libreoffice-ja
+
  42) libreoffice-ka  43) libreoffice-kk  44) libreoffice-km  45) libreoffice-kn
+
  46) libreoffice-ko  47) libreoffice-kok  48) libreoffice-ks  49) libreoffice-ku
+
  50) libreoffice-lo  51) libreoffice-lt  52) libreoffice-lv  53) libreoffice-mai
+
  54) libreoffice-mk  55) libreoffice-ml  56) libreoffice-mn  57) libreoffice-mni
+
  58) libreoffice-mr  59) libreoffice-my  60) libreoffice-nb  61) libreoffice-ne
+
  62) libreoffice-nl  63) libreoffice-nn  64) libreoffice-nso  65) libreoffice-oc
+
  66) libreoffice-om  67) libreoffice-or  68) libreoffice-pa-IN  69) libreoffice-pl
+
  70) libreoffice-pt  71) libreoffice-pt-BR  72) libreoffice-ro  73) libreoffice-ru
+
  74) libreoffice-rw  75) libreoffice-sa-IN  76) libreoffice-sat  77) libreoffice-sd
+
  78) libreoffice-sh  79) libreoffice-si  80) libreoffice-sk  81) libreoffice-sl
+
  82) libreoffice-sq  83) libreoffice-sr  84) libreoffice-ss  85) libreoffice-st
+
  86) libreoffice-sv  87) libreoffice-sw-TZ  88) libreoffice-ta  89) libreoffice-te
+
  90) libreoffice-tg  91) libreoffice-th  92) libreoffice-tn  93) libreoffice-tr
+
  94) libreoffice-ts  95) libreoffice-ug  96) libreoffice-uk  97) libreoffice-uz
+
  98) libreoffice-ve  99) libreoffice-vi  100) libreoffice-xh  101) libreoffice-zh-CN
+
  102) libreoffice-zh-TW  103) libreoffice-zu
+
 
+
Enter a number (default=1):
+
 
</pre>
 
</pre>
{{Note|A common mistake is to install {{ic|libreoffice-uk}}, which is the Ukrainian language pack, instead of libreoffice-en-GB.}}
 
Alternatively, you can install it this way:
 
# pacman -S libreoffice-common libreoffice-{base,calc,draw,impress,math,writer,gnome,kde4,sdk,sdk-doc}
 
 
{{Note|Both ways work and you need libreoffice-kde4 or libreoffice-gnome only if you care about qt or gtk visual integration - see Theme section below.}}
 
 
Check the recommended optional dependencies pacman suggests e.g. install a Java Runtime Environment (optional, highly recommended). See: [[Java]]
 
 
==Theme==
 
For Qt integration
 
# pacman -S libreoffice-kde4
 
For GTK integration
 
# pacman -S libreoffice-gnome
 
 
==Extension management==
 
 
Arch is shipping some additional extensions. We currently ship these extensions: pdfimport  presentation-minimizer presenter-screen report-builder wiki-publisher ct2n hunart numbertext oooblogger typo watch-window diagram.
 
 
* If you find any of them useful install it
 
# pacman -S libreoffice-extension-nlpsolver libreoffice-extension-foo ...
 
 
Check the built-in LibreOffice Extension manager or [http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List Get extensions Online] if you want to install more extensions.
 
 
==Language Aids==
 
===Spell checking===
 
For spellchecking you will need hunspell and a language dictionary for hunspell (like hunspell-en for English, hunspell-de for German, etc).
 
# pacman -S hunspell hunspell-en hunspell-de ...
 
 
===Hyphenation rules===
 
For hyphenation rules you will need hyphen and a language hyphen rule set (hyphen-en for English, hyphen-de for German, etc).
 
# pacman -S hyphen hyphen-en hyphen-de ...
 
 
===Thesaurus===
 
For Thesaurus option you will need mythes and a mythes language thesaurus (like mythes-en for English, mythes-de for German, etc)).
 
# pacman -S libmythes mythes-en mythes-de ...
 
 
===Grammar checking===
 
For Grammar checking you will need to install an extension such as LanguageTool, which can be found in the AUR: [http://aur.archlinux.org/packages.php?ID=51253 libreoffice-extension-languagetool] or the [http://www.languagetool.org/ LanguageTool Website].
 
 
Other grammar tools can also be found on the [http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List Libre Office Extension Page] or [http://lingucomponent.openoffice.org/grammar.html OpenOffice's Website] (warning, not all OpenOffice extensions are guaranteed to work with libreoffice)
 
 
==Installing Macros==
 
In most Linux distros, the default path for macros is:
 
~/.openoffice.org/3/user/Scripts/
 
The path for this directory for LibreOffice in Arch Linux is:
 
~/.config/.libreoffice/3/user/Scripts/
 
 
Another thing to note is that if you intend to use macros, you must have a JRE enabled, use of a JRE is default behaviour; but disabling it's use is listed in the speed tweaks below.
 
 
==Running LibreOffice==
 
 
If you want to run a specific module of LibreOffice (instead of the libreoffice (soffice is still included for fallback reasons) default Startcenter), for example the word processor (Write), spreadsheet application (Calc) or presentation program (Impress), check for the following script front-ends:
 
 
Writer (Text processor)
 
  /usr/bin/libreoffice --writer or /usr/bin/soffice --writer
 
 
Calc (Spreadsheet editor)
 
  /usr/bin/libreoffice --calc
 
 
Impress (Presentation editor)
 
  /usr/bin/libreoffice --impress
 
 
Draw (Vector graphics editor)
 
  /usr/bin/libreoffice --draw
 
 
Math (Formula Editor)
 
  /usr/bin/libreoffice --math
 
 
Base (Database frontend)
 
  /usr/bin/libreoffice --base
 
 
==Speed up LibreOffice==
 
Some settings may improve LibreOffice's loading time and responsiveness. However, some also increase RAM usage, so use them carefully. They can all be accessed under ''Tools > Options''.
 
*Under ''Memory'':
 
**Reduce the number of Undo steps to a figure lower than 100, to something like 20 or 30 steps.
 
**Under Graphics cache, set Use for LibreOffice to 128 MB (up from the original 20MB).
 
**Set Memory per object to 20MB (up from the default 5MB).
 
**If you use LibreOffice often, check LibreOffice Quickstarter.
 
*Under ''Java'', uncheck Use a Java runtime environment.
 
{{Note|For a list of functionality which depends on OpenOffice Java support, see this page: http://wiki.services.openoffice.org/wiki/Java - Still needed?}}
 
 
==Troubleshooting==
 
=== Font substitution ===
 
These settings can be changed in the LibreOffice options. From the drop-down menu, select ''Tools > Options > LibreOffice > Fonts''. Check the box that says ''Apply Replacement Table''. Type {{Codeline|Andale Sans UI}} in the font box and choose your desired font for the ''Replace with'' option. When done, click the ''checkmark''. Then choose the ''Always'' and ''Screen only'' options in the box below. Click OK.
 
You will then need to go to ''Tools > Options > LibreOffice > View'', and uncheck "Use system font for user interface". If you use a non-antialised font, such as Arial, you will also need to uncheck "Screen font antialiasing" before menu fonts render correctly.
 
 
=== Anti-aliasing ===
 
Execute
 
$ echo "Xft.lcdfilter: lcddefault" | xrdb -merge
 
 
To make the change persistent, add "{{Codeline|Xft.lcdfilter: lcddefault}}" to your {{Filename|~/.Xresources}} file. [https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/271283/comments/19].
 
 
If this doesn't work you can also try adding "{{Codeline|Xft.lcdfilter: lcddefault}}" to your {{Filename|~/.Xdefaults}}. If you do not have this file, you will have to create it.
 
 
===Spell checking problems===
 
As of openoffice 3.0.0-2, various dictionaries may be buggy due to a character encoding problem. To solve this issue, follow the following instructions.
 
 
Find where the particular openoffice distribution places its dictionary files; e.g., {{codeline|pacman -Ql openoffice-base}}. Most distibutions follow the convention of installing these to {{filename|/usr/lib/openoffice/share/extension/install}}. Once the directory has been found, assign it to a shell variable:
 
droot="/usr/lib/openoffice/share/extension/install"
 
 
Install {{package Official|unzip}} and {{package Official|zip}} packages in order to be able to extract the dictionary files:
 
pkg=$(pacman -T unzip zip) || pacman -S $pkg
 
 
For reference, get a list of languages whose dictionary files are packaged with the base distribution:
 
cd "$droot" && ls | sed -rn 's,^dict-(..)\.oxt$,\1,p'
 
 
Define a list of languages whose dictionary files are to be fixed:
 
lang="en es"
 
 
Extract the target languages' dictionary files and convert the erroneous encoding to ''UTF-8'':
 
tmp="/tmp/dictfix-$USER-$$"
 
 
mkdir "$tmp"
 
cd "$tmp"
 
 
for i in $lang; do
 
i="$droot/dict-$i.oxt"
 
unzip "$i" -d oxt.tmp
 
iconv -f ISO-8859-15 -t UTF-8 oxt.tmp/dictionaries.xcu > dict.tmp
 
mv dict.tmp oxt.tmp/dictionaries.xcu
 
(cd oxt.tmp && zip -r "$i" .)
 
done
 
 
rm -rf "$tmp"
 
 
Finally, use the openoffice extension manager (available through the ''Tools'' menu) to install the dictionary from the resulting {{filename|dict-''xx''.oxt}} file(s).
 
 
===Dark GTK themes, Icons and gtk-qt-engine===
 
For a quick fix, see [http://aur.archlinux.org/packages.php?ID=22383 openoffice-dark-gtk-fix] or if you have go-openoffice see [http://aur.archlinux.org/packages.php?ID=28879 go-openoffice-dark-gtk-fix] on the AUR. This also sets 'OOO_FORCE_DESKTOP=gnome'. Another fix is to export SAL_USE_VCLPLUGIN=gen (generic X11). See [http://user.services.openoffice.org/en/forum/viewtopic.php?f=16&t=27216#p123942 for more info]
 
 
'''In newer version of OO (3.2.0) and Libre''', the fixes mentioned above do not seem to work. If you use a dark GTK theme, you will be unable to change the icons from &ldquo;high-contrast&rdquo;. The colors can be configured manually in ''Options -> Appearance'', but Impress and Calc (maybe others too) will stay dark unless you disable automatic detection of high contrast themes first. The problem is with the default setting of &ldquo;Automatically detect high contrast mode of operating system&rdquo;. To change the default setting and allow the selection of icons and custom colors with a dark GTK theme, edit the following option:
 
 
{{Box_BLUE|Tools &gt; Options... &gt; Accesibility|&gt; Uncheck: &nbsp; [ ] Automatically detect high contrast mode of operating system}}
 
 
Now the colors can be configured in ''Options -> Appearance''.
 
 
=== Hanging when using NFS shares ===
 
If OpenOffice hangs when trying to open/save a document located on a NFS share, try prepending the following lines with a "#" in /usr/lib/openoffice/program/soffice (/usr/bin/soffice if using go-openoffice):
 
# file locking now enabled by default
 
SAL_ENABLE_FILE_LOCKING=1
 
export SAL_ENABLE_FILE_LOCKING
 
Original post [http://www.crazysquirrel.com/computing/debian/bugs/openoffice-over-nfs.jspx here]
 
<br>
 
{{Note|Only NFSv3 is affected. NFSv4 works well with OpenOffice.}}
 
 
=== Fixing Java Framework Error ===
 
You may get the following error when you try to run OpenOffice.
 
 
[Java framework] Error in function createSettingsDocument (elements.cxx).
 
javaldx failed!
 
 
If so, give yourself ownership of {{Codeline|~/.config/}} like so:
 
sudo chown -vR username:users ~/.config
 
 
[https://bbs.archlinux.org/viewtopic.php?id=93168 Post on Arch Linux Forums]
 
 
=== Fixing Java Not Found Errors ===
 
 
After a fresh install, when using the jre/jdk packages in the community repo, you may receive a notice "Could not find a Java Runtime Environment!" or the following from the shell:
 
 
javaldx: Could not find a Java Runtime Environment!
 
Warning: failed to read path from javaldx
 
 
The issues seems to be a lack of support for jre-7. This can be fixed by removing jre and/or jdk [pacman -R jre jdk] and will likely require you to remove libreoffice. Once uninstalled, you can install the support jre6 and jdk6 packages.
 
 
=== LibreOffice doesn't detect my certificates ===
 
  
If you can't see the certificates when trying to sign a document, you will need to have the certificates configured in Firefox (or Thunderbird). If after that LibreOffice still doesn't show them, set the MOZILLA_CERTIFICATE_FOLDER environment variable pointing to your Firefox (or Thunderbird) folder.
+
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.  
  
export MOZILLA_CERTIFICATE_FOLDER=$HOME/.mozilla/firefox/XXXXXX.default/
+
For more information on how to use the macro, consult the [http://ooolatex.sourceforge.net/ project's website].
  
[http://wiki.services.openoffice.org/wiki/Certificate_Detection Certificate Detection]
+
==References==
  
=== Error while loading shared libraries: libdb-5.2.so ===
+
* [http://ubuntuforums.org/showthread.php?t=334218  OOoLatex for Ubuntu]
If running LibreOffice returns the following error:
+
* [http://ooolatex.sourceforge.net/  project's website]
/usr/lib/libreoffice/program/soffice.bin: error while loading shared libraries: libdb-5.2.so: cannot open shared object file: No such file or directory
+
You can fix this by [[pacman|installing]] {{Package Official|db}} from [core].
+

Revision as of 11:54, 14 August 2012

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

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.

For more information on how to use the macro, consult the project's website.

References