user-manual3.html
Author: Henrik Just
Date: 2004-12-30T10:11:50

[First] [Previous] [Next] [Last] [Contents]

# 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:

1. Unzip writer2latex04beta2.zip into some directory. This will create a subdirectory writer2latex04.

2. Add this directory to your PATH environment variable.

3. 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

1. Unzip writer2latex04beta2.zip into some directory. This will create a subdirectory writer2latex04.

2. Add this directory to your PATH environment variable or create a symbolic link to the file w2l from some directory in yout PATH.

3. 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.

1. 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/”

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

1. Copy writer2latex.jar, xmergefix.jar and writer2latex.xml into the classes directory

   <OOo install>/program/classes/

2. Rename the existing xmerge.jar to oldxmerge.jar (or whatever you like; this is only to have a backup of the old version).

3. Rename xmergefix.jar to xmerge.jar.

4. Copy w2lfilter.zip into the directory

   <OOo install>/share/uno_packages

5. Make sure that no OOo processes are running: Close all document windows and (under MS Windows) the Quick Starter.

6. 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.

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

1. Make sure that no OOo processes are running: Close all document windows and (under MS Windows) the Quick Starter.

2. From a command shell, navigate to the directory

   <OOo install>/program

   and type

   unopkg gui

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

1. Delete w2lfilter.zip from the directory

   <OOo install>/share/uno_packages

2. Make sure that no OOo processes are running: Close all document windows and (under MS Windows) the Quick Starter.

3. 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.

4. Now restart OOo.

You may also undo the changes you have made to OOo's classes directory, but this is not required.