2 Installation
2.1 How to install Writer2LaTeX for command line usage
Writer2LaTeX can work as a standalone command line utility (that is without OOo).
Installation for Microsoft Windows
To install Writer2LaTeX under Microsoft Windows follow these instructions:
-
Unzip writer2latex04beta2.zip into some directory. This will create a subdirectory writer2latex04.
-
Add this directory to your PATH environment variable.
-
Open the file w2l.bat with a text editor and replace the path at the top of the file with the full path to Writer2LaTeX, for example
set W2LPATH="c:\writer2latex04"
(If you have extracted to the root of drive C, you don't have to edit this line.)
At a command line type java -version to verify that the Java executable is in your path. If this is not the case or you have several Java versions installed you should edit the next line to contain the full path to the Java executable, eg.
set JAVAEXE="C:\j2sdk1.4.0_01\bin\java”
Installation for Unix and friends
-
Unzip writer2latex04beta2.zip into some directory. This will create a subdirectory writer2latex04.
-
Add this directory to your PATH environment variable or create a symbolic link to the file w2l from some directory in yout PATH.
-
Open the fle w2l with a text editor and replace the path at the top of the file with the full path to Writer2LaTeX, eg.
-
W2LPATH="/home/username/writer2latex04"
(If you have extracted into your home directory, you don't have to edit this line.)
Open a command shell and type java -version to verify that the Java executable is in your path. If this is not the case or you have several Java versions installed you should edit the next line to contain the full path to the Java executable, ie.
set JAVAEXE="/path/to/java/executable/”
-
Add execute permissions to w2l as follows:
chmod +x w2l
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.
You can also use Writer2LaTeX as an export filter in OOo 1.9.x (tested with 1.9.62 and 1.9.65).
The following instructions covers all operating systems.
Uninstalling previous versions of Writer2LaTeX
If you have installed a version of Writer2LaTeX prior to 0.3.2, 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 (take a backup copy this time!).
When you restart OOo, the filters should have disappeared from the File – Export menu.
See the section below for information on how to uninstall Writer2LaTeX 0.3.2 and later.
Installation
Note: If you have made a -net (multiuser) installation of OOo, you will normally 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 a 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.
Notes on OOo 1.9.x
In OOo 1.9.x you can configure java under Tools – Options.
Also there is now a graphical interface to install packages. Replace steps 4-6 with the following:
-
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
unopkg gui
-
Select OpenOffice.org packages and select w2lfilters.zip using the Browse button.
If you only want to install for a single user, select My packages instead – this is also possible from inside OOo, using the Tools – Packages menu.
2.3 Uninstall Writer2LaTeX
To remove the Writer2LaTeX filters from your OOo installation, you should proceed as follows:
-
Delete w2lfilter.zip from 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 remove the registration of Writer2LaTeX from OOo. If it works, there will be no messages on the screen.
-
Now restart OOo.
You may also undo the changes you have made to OOo's classes directory, but this is not required.