2 Using the export filters

2.5 Using Writer2xhtml

To export a Writer document to xhtml, choose one of the following formats in the export dialog:

In all cases, Writer2xhtml uses CSS to format the document, either by converting the original formatting to CSS or by using a CSS style sheet selected by the user.

Note that the default file extension and the recommended MIME types varies with the output format:

Output format

Default file extenstion

MIME type

XHTML 1.0

.html

text/html

XHTML 1.1 + MathML 2.0

.xhtml

application/xhtml+xml

XHTML 1.1 + MathML 2.0 (with xsl transformation)

.xml

application/xml

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

 

grafik2

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

Style options

Use style

This option allows you to choose between various styles to apply to the xhtml document.

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

Scaling

Viewing the document in a web browser may require different dimensions (e.g. font sizes) than the original Writer document. Using this option you can define a percentage used to scale all dimensions, thus with the setting 140, all dimensions will be 40% larger than in the Writer document. Depending on the style you have selected and on the option Use original image size, some dimensions may be unaffected by this option.

Column scaling

This is a similar option, which only affects tables. Thus you can further widen or narrow the columns of tables if you wish.

Convert units to px (pixels)

In Writer, font sizes are usually given in points and other dimensions in e.g. cm or inches. For xhtml it is recommended to use the unit px instead, and using this option you can require that all dimensions are converted to px. If you choose not to check this option,the original units will always be used.

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 xhtml document, but if you select this option, the original (unscaled) image size will be used.

Options for special content

Export notes

If you select this option, notes (also known as annotations) in the Writer document are exported as comments in the xhtml document. They will not be directly visible in the browser, only in the xhtml source. If the option is not selected, notes are completely ignored.

Export document properties (Dublin Core Metadata)

If you select this option, the document properties (File – Properties) are exported using the Dublin Core standard. See http://dublincore.org/ for details on this.

AutoCorrect options

Ignore hard line breaks

Sometimes hard (or manual) line breaks are used in Writer to optimize the placement of the line breaks. Since line breaking in a browser is completely different, you may want to ignore all hard line breaks by selecting this option.

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.

Ignore double spaces

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

File options

Split document at headings

To make a long Writer document easier to read in the browser, you can use this option to split the document in several small files. Writer2xhtml will add a simple navigation panel that lets you move between pages. The navigation links will be in the same language as the document (as defined under Tools – Options – Language Settings – Languages)5. Note that this option has no effect for headings inside tables.

Heading level

If you have chosen to split the document at headings, you can use this option to define at which level splitting should occur. For example 2 to split the document at all headings of level 1 or 2.

Repeat heading levels

To help the reader to identify the current position within the document, you can use this option to repeat the parent headings whenever the document is split. If you for example split at headings of level 3 and set this option to 2, the headings of level 1 and 2 will be repeated before the heading of level 3, providing precise information as to where in the document the section belongs.

Save images in subdirectory

Writer2xhtml normally saves images associated with the document in the same directory as the xhtml 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 xhtml document to store the images.

5 At the moment only a small number of languages are supported: English, Danish, German, Finnish, French, Spanish, Italian, Croatian, Russian and Ukrainian.