2.2 How to install Writer2LaTeX as an export filter
Writer2LaTeX can work as an export filter for OOo Writer. This requires OpenOffice.org 1.1 or StarOffice 7. It does not work with OpenOffice.org 1.0 or StarOffice 6.0.
The following instructions covers all operating systems.
Uninstalling previous versions of Writer2LaTeX
If you have installed a previous version of Writer2LaTeX you will have to undo the changes you made to the file TypeDetection.xcu:
-
If you copied TypeDetection.xcu into your user settings you can delete or (to be safe) rename the file.
-
If you edited an existing version of TypeDetection.xcu you should restore the backup copy of the file. If you forgot to take a backup, you will have to delete the additions by hand.
When you restart OOo, the filters should have disappeared.
Installation
Note: If you have made a -net (multiuser) installation of OOo, you will probably need to log in as root/administrator to install Writer2LaTeX.
Before you start, you need an installation of OOo where
-
You have set up OOo to use Java. If you didn't do that during installation, you can run <OOo install>/program/jvmsetup. (Of course this requires that you have installed Java on your system).
-
You must have the Mobile Device Filters installed. If you didn't install these during installation (it's not part of a standard installation!), you can run OOo setup, choose Modify and add the filters. This will install a framework for Java based filters in OOo (known as xmerge), which is also used by Writer2LaTeX (despite the fact that it has nothing to do with mobile devices).
Then the installation proceeds as follows:
-
Copy writer2latex.jar, xmergefix.jar and writer2latex.xml into the classes directory
<OOo install>/program/classes/
-
Rename the existing xmerge.jar to oldxmerge.jar (or whatever you like; this is only to have a backup of the old version).
-
Rename xmergefix.jar to xmerge.jar.
-
Copy w2lfilter.zip into the directory
<OOo install>/share/uno_packages
-
Make sure that no OOo processes are running: Close all document windows and (under MS Windows) the Quick Starter.
-
From a command shell navigate to the directory
<OOo install>/program
and type
pkgchk --shared
This will register Writer2LaTeX as a filter in OOo. If it works, there will be no messages on the screen.
-
Now restart OOo.
To use the LaTeX files generated by Writer2LaTeX, you will need the LaTeX package writer.sty, see section 3.1.