2 Using the export filters

2.3 Using Writer2LaTeX and Writer2BibTeX

To export a Writer document to LaTeX, choose LaTeX 2e in the export dialog.

After you have typed in a file name, an options dialog will open:

 

grafik1

The individual options are explained below. Click Export to initiate the export or Cancel to close the dialog without exporting the document.

General options

LaTeX format

Conceptually, Writer and LaTeX are quite different. A LaTeX document is usually based on a certain document class, that determines the general layout and formatting of the document. In addition the use of several LaTeX packages may change various aspects of the LaTeX document.

The result of a conversion into LaTeX will thus depend very much on which LaTeX packages are used and how much formatting it is desired to preserve.

Writer2LaTeX offers a number of default formats, all based on the standard LaTeX document class article. Each of the formats defines the LaTeX packages to use and the handling of formatting.

Advanced users can extend the list with further formats using configuration packages, see section 2.8.

Backend

When processing a LaTeX document, the final result is a document in a certain backend format. The handling of certain aspects of the document, in particular graphics, depends on the backend. With this option you can select the backend format.

If you have selected the format Screen optiomized (pdf), you cannot select the backend, which will always be pdf.

Encoding

A LaTeX document is a text file, which always uses a certain character encoding. The character encoding is important if the LaTeX file is going to be edited in a text editor: You should select an encoding that is supported by your text editor. This setting is also important to get optimal support for international characters: If you for example use pdfTeX, searching in the final pdf document will only work for characters supported by the selected character encoding.

Currently, Writer2LaTeX supports 8 different encodings which together are suitable for a large number of languages written with either latin, greek or cyrillic letters. Currently asian (CJK) and bidirectional (CTL) scripts are not supported.

Enable multilingual support

If you check this option, all the language settings in the Writer document will be exported to LaTeX. Sometimes the language settings in a Writer document are not correct, so if you have a document that is written in one language only you may want to uncheck this option. This will produce a cleaner LaTeX file because you may avoid a large number of language selections.

Use greek letters as symbols

Greek letters used in latin text are often used as symbols, such as the number π or the word γ-radiation. By checking this option, all greek letters used within latin or cyrillic text will be treated as mathematical symbols, which will produce a slightly better result – and also not require that greek text fonts are available in the LaTeX installation. This option has no effect on greek text (provided the language is set correctly in the Writer document).

Support additional  symbols

If you select this option, LaTeX will load some additional packages containing support for various symbols: A better looking euro-symbol, phonetic characters, dingbats and various other symbols and geometric shapes.

Bibliography options

Use BibTeX for bibliography

Usually the bibliography in a LaTeX document is generated by the companion program BibTeX. If you check this option, all the bibliographic references will be exported to BibTeX format for later processing with the BibTeX program.

BibTeX style

If you use BibTeX, you should also select a BibTeX style to be used when generating the bibliography. Select one of the predefined styles or type the name of any BibTeX style which is available in your LaTeX installation.

Files options

Wrap long lines

Checking this option wraps long lines in the generated LaTeX file. This enhances the readability if the file is later edited in a text editor. If you use a text editor that wraps lines automatically, you should uncheck this option.

After characters

If you choose to wrap long lines, they will be wrapped as soon as possible after this number of characters.

Split document at linked sections

Checking this option will create separate LaTeX files for sections in the Writer document with linked content. This can be an advantage if the LaTeX document is later edited in a text editor.

Split document at top level sections

Checking this option will create separate LaTeX files for all top level sections in the Writer document (but not for nested sections).

Save images in subdirectory

Writer2LaTeX normally saves images associated with the document in the same directory as the LaTeX document. If the document contains a large number of images it may be more convenient to save the images in a separate subdirectory. This option will create a subdirectory with the same name as the LaTeX document to store the images.

Options for special content

Export notes

This option determines how to export notes (also known as annotations) in the Writer document

Export document properties (metadata)

If you check this option, Writer2LaTeX will export the title, author and date of the document as found under File – Properties. Furthermore, if you have chosen pdf as the backend, the title, author, subject and keywords will be exported to the pdf document and will be viewable if the pdf viewer supports it. If the option is not checked, only the title will be exported.

Options for figures and tables

Use original image size

Often images in a Writer document are scaled up or down from their original size. Normally the same scaling will be used in the LaTeX document, but if you select this option, the original (unscaled) image size will be used.

Optimize simple tables

Normally Writer2LaTeX will generate tables with the same column widths as in the original document. For tables with simple content it may be more desirable to create tables which are as narrow as possible, with only one line of text per cell. Compare the table

Simple content

Simple content

Simple content

Simple content

to the optimized table

Simple content

Simple content

Simple content

Simple content

If you check this option, Writer2LaTeX will try to optimize tables.

Maximum width in characters

If you have chosen to optimize simple tables, you have to specify the maximum width of the table, measured in the number of characters. If you for example set the number to 50, only tables with a total width of 50 or fewer characters will be optimized.

Float tables

In Writer you can either choose that the rows of a table must be kept together on one page or that the table may split across page breaks. Keeping a table on one page may be desirable to increase the readability of the table, but it may also leave large white gaps at the bottom of the page. In LaTeX this problem is solved with floating tables: A table can automatically move to another position which fixes the whitespace problem. If you check this option, all tables that are not allowed to break across pages are exported as floating tables.

Float figures

A similar option is available for figures (graphics, text boxes). If you check this option, figures are converted to floating figures which can move in the document to reduce whitespace. This will not affect figures anchored as character.

Float placement

If you choose to let either tables or figures float, use this option to specify the placement of the floats:

In all cases it might happen that LaTeX creates some special pages which only contains floats. This will usually be the case if there are many floats compared to the amount of text.

AutoCorrect options

Ignore hard page breaks

Hard (or manual) page breaks are often used to optimize page breaks in the final editing of a document. In this case you will probably not want to export these page breaks, as LaTeX creates page breaks that are quite different from the page breaks in Writer. If you select this option, hard page breaks will be ignored when exporting the document.

Ignore hard line breaks

For similar reasons, you can select this option to ignore hard (manual) line breaks during export.

Ignore empty paragraphs

Empty paragraphs are sometimes used a simple means to create vertical spacing in Writer. In a well-structured document, an empty paragraph is probably a mistake. Hence you can select this option to ignore empty paragraphs in the document in the export. If you do not select the option, an empty paragraph is exported as vertical space.

Ignore double spaces

For similar reasons you can choose to ignore two or more spaces in a row using this option.