Difference between revisions of "Ooolatex"

From ArchWiki
Jump to: navigation, search
Line 4: Line 4:
  
 
==OOoLatex in Arch Linux==
 
==OOoLatex in Arch Linux==
This article explains how to install OOoLatex for Arch Linux users, assuming one has a working [.LaTex] system and Ghostscript package installed.  
+
This article explains how to install OOoLatex for Arch Linux users, assuming one has a working [[LaTex]] system and Ghostscript package installed.  
  
 
==Installation==
 
==Installation==

Revision as of 15:29, 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.

OOoLatex in Arch Linux

This article explains how to install OOoLatex for Arch Linux users, assuming one has a working LaTex system and Ghostscript package installed.

Installation

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:

[user@home ~]# pacman -S libreoffice
:: 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):
Note: A common mistake is to install 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 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: libreoffice-extension-languagetool or the LanguageTool Website.

Other grammar tools can also be found on the Libre Office Extension Page or 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 Template:Codeline 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 "Template:Codeline" to your Template:Filename file. [1].

If this doesn't work you can also try adding "Template:Codeline" to your Template:Filename. 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., Template:Codeline. Most distibutions follow the convention of installing these to Template:Filename. Once the directory has been found, assign it to a shell variable:

droot="/usr/lib/openoffice/share/extension/install"

Install Template:Package Official and Template:Package Official 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 Template:Filename file(s).

Dark GTK themes, Icons and gtk-qt-engine

For a quick fix, see openoffice-dark-gtk-fix or if you have go-openoffice see 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 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 “high-contrast”. 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 “Automatically detect high contrast mode of operating system”. To change the default setting and allow the selection of icons and custom colors with a dark GTK theme, edit the following option:

Tools > Options... > Accesibility > Uncheck:   [ ] 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 here

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 Template:Codeline like so:

sudo chown -vR username:users ~/.config

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.

export MOZILLA_CERTIFICATE_FOLDER=$HOME/.mozilla/firefox/XXXXXX.default/

Certificate Detection

Error while loading shared libraries: libdb-5.2.so

If running LibreOffice returns the following error:

/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 installing Template:Package Official from [core].