3 Using the command line utility

3.1 How to install Writer2LaTeX for command line usage

Writer2LaTeX can work as a standalone command line utility (an installation of OOo is not required).

Limitation: The export filters support conversion of embedded objects and graphics to a suitable format. The command line utility can only handle graphics in the original format.

Installation for Microsoft Windows

To install Writer2LaTeX under Microsoft Windows follow these instructions:

  1. Unzip writer2latex102.zip into some directory. This will create a subdirectory writer2latex10.

  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:\writer2latex10"

    (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:\Program Files\java\j2sdk1.5.0_22\bin\java”

Installation for Unix and friends

  1. Unzip writer2latex102.zip into some directory. This will create a subdirectory writer2latex10.

  2. Add this directory to your PATH environment variable.

  3. Add execute permissions to w2l as follows:

    chmod +x w2l

In some cases you may have to edit the script slightly:

If you place w2l and writer2latex.jar in different directories, or if you choose to create a symbolic link to the script: Open the file 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/writer2latex10"

Also, the script assumes that the java executable is in your path, or that the JAVA_HOME variable points to the locations. To verify the former, open a command shell and type java -version. To verify the latter, type env. If neither is the case or you have several Java versions installed you should edit this line to contain the full path to the Java executable, ie.

set MYJAVAEXE="/path/to/java/executable/”