3.2 Converting to LaTeX from the command line

To convert a file to LaTeX use the command line

w2l [-latex] [-config <configfile>] <writer document to convert>

The parts in square brackets are optional.

This will produce a LaTeX file with the same name as the original document, but the extension changed to .tex.

Examples:

w2l mydocument.sxw

or

w2l -config clean.xml mydocument.sxw

If you specify the -config option, Writer2LaTeX will load this configuration file before converting your document. You can read more about configuration in section 3.5.

The script w2l also provides a shorthand notation to use the sample configuration files included in writer2latex032.zip. The command line is

w2l [-clean|-pdfscreen|-pdfprint|-article] <writer document to convert>

For example to produce a clean LaTeX file (ie. ignoring most of the formatting from the source document):

w2l -clean mydocument.sxw

It is recommended that you extend w2l / w2l.bat to support your own configuration files.