# HTML Export (Writer)

org.openoffice.da.writer2xhtml.oxt/export.xhp
HTML Export (Writer)
Exports the current document to HTML format.
Choose File - Export - XHTML 1.0 strict
or File - Export - XHTML 1.1
or File - Export - XHTML 1.1 + MathML 2.0
or File - Export - HTML5
or click the HTML5-button in the toolbar
General
Select the style to use for the HTML document
Use style
This option allows you to choose between various styles to apply to the HTML document.
- Original formatting
  produces an HTML document which uses the same style as the original document. The document will look quite similar to the original when viewed in a browser. If you choose to split the document at headings, a simple navigation panel to go back and forward through the files will be added as a header and footer.
- Original formatting with navigation panel
  also produces an HTML document which uses the same style as the original document. This setting will add a navigation panel to the left to navigate through the files. The navigation panel displays a table of contents based on headings and indexes in the document.
- Clean HTML
  produces a HTML document without any CSS styling. Use this if you only want to export the content of the file, but not the formatting.
- Custom
  is a user defined format. You can define your own style by providing a CSS style sheet and a mapping from Writer styles to your CSS styles. To configure the custom format, choose Tools - Options - Writer2xhtml.
- W3C Chocolate, W3C Midnight, W3C Modern, W3C Oldstyle, W3C Steely, W3C Swiss, W3C Traditional and W3C Ultramarine
  formats the document with one of the 8 core styles provided by the World Wide Web Consortium.
Expert users can extend the list with further formats using configuration packages. See the documentation on the web site for Writer2xhtml. An example configuration package xhtml-config-sample.oxt is provided.
Select the units to use for dimensions in the HTML document, either the original units, pixels or relative units (recommended)
Units
In %PRODUCTNAME, font sizes are usually given in points and other dimensions in e.g. cm or inches. Use this option to select how to convert units.
- Original
  will use the same units as in the source documents. This is generally not recommended, except for printing purposes.
- Pixels (px)
  will convert all units to pixels (roughly 1/96 of an inch).
- Relative (rem)
  will convert all units to relative units (rem). This is the recommended setting, which will create a document suitable for viewing on any device.
Select a scaling to apply to all dimensions in the document
Scaling
Viewing the document in a web browser may require different dimensions (e.g. font sizes) than the original 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 original document. Depending on the style you have selected and on the settings for image size and tables size below, some dimensions may be unaffected by this option.
Check this if you want to include language information for all used languages in the document
Enable multilingual support
Check this to include language information for all used languages in the HTML document. Otherwise only the default language will be exported.
Files
Split document at headings
Check this to create a new document for each heading
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).
Note that this option has no effect for headings inside tables.
Select the heading level at which the spliting should occur
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
Select the number of heading levels to repeat at the top of new documents
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.
File names
Select how to create file names for the secondary HTML files
When you split the document at headings, Writer2xhtml produces several HTML files. You can use this option to specify how to create file names for the secondary HTML files. Let us say that you document is named "document" and has the headings "The first heading" and "The second heading".
- Base file name + number
  will use a sequential numbering scheme. With the example, it will produce the files document.html, document1.html, document2.html.
- Base file name + section
  will replace the number with the current heading. With the example, it will produce the files document.html, document-the-first-heading.html, document-the-second-heading.html.
- Section
  will do the same, but only include the base file name for the first file. With the example, it will produce the files document.html, the-first-heading.html, the-second-heading.html.
Check this to save images in a subdirectory relative to the exported document
Save images in subdirectory
Writer2xhtml normally saves images associated with the document in the same directory as the HTML 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 HTML document to store the images.
Special content
Check this if you want to export notes (annotations) in the document
Export notes
If you select this option, notes (also known as annotations) in the %PRODUCTNAME document are exported as comments in the HTML document. They will not be directly visible in the browser, only in the HTML source. If the option is not selected, notes are completely ignored.
Check this if you want to export all meta data (using the Dublin Core standard)
Export document properties (Dublin Core Meta data)
If you select this option, the document properties (File - Properties) are exported using the Dublin Core standard.
Figures, tables and formulas
Select how to handle the size of images, either by using the size defined in the document, define as a percentage of the screen width or by using the natural dimensions of the image
Image size
Often images in a %PRODUCTNAME document are scaled up or down from their original size. Using this option you can select how to handle image sizes.
- Automatic
  will export a size based on the size defined in the Writer document. The image will thus have a fixed size in the HTML document.
- Relative to page width
  will calculate the width of the image relative to the page. The image will thus occupy a fixed percentage of the screen width.
- Do not export
  will not export image dimensions. The image will thus have the natural, unscaled size.
Embed vector graphics
Check this to embed vector graphics in the document rather than in a separate file
Vector graphics is exported to SVG format. If you check this option, the SVG image will be embedded directly in the HTML document. Otherwise they will be included in a separate file.
Check this to embed raster graphics in the document rather than in a separate file
Embed raster graphics
Raster graphics is exported to JPEG, PNG or GIF format. If you check this option, all raster images will be embedded directly in the HTML document (base64 encoded). Otherwise they will be included in a separate file. This is not recommended for documents with large images.
Select how to handle the size of tables, either by using the size defined in the document, define as a percentage of the screen width or by leaving the layout to the browser
Table size
Using this option you can select how to handle table sizes.
- Automatic
  will export a size based on the size defined in the Writer document. The table will thus either have a fixed size in the resulting document or occupy a fixed percentage of the screen width.
- Relative to page width
  will calculate the width of the table relative to the page. The table will thus occupy a fixed percentage of the screen width.
- Do not export
  will not export table dimensions. The size of the table will thus be adapted to the content.
Select a scaling to apply to all column dimensions in the document
Column scaling
This is a similar option, which only affects table columns. Thus you can further widen or narrow the columns of the tables if you wish.
Check this to load the JavaScript library MathJax for viewing mathematical content
Use MathJax
This option is only available if you export to XHTML+MathML or HTML5. MathJax is a JavaScript library for displaying mathematical content in web pages. Using MathJax ensures that your mathematical content will display correctly in most browsers. This includes formulas created with the extension TexMaths.
Select how to export mathematical formulas, either as images or as plain text in StarMath notation
Formulas
Select how to export formulas if you are not using XHTML+MathML or HTML5.
- Image with StarMath code
  : Export formulas as images with the original StarMath formula in the alt attribute.
- StarMath code
  : Export the original StarMath code directly in the text.
AutoCorrect
Ignore hard line breaks
Check this if you don't want to export hard (manual) 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.
Check this if you don't want to export empty paragraphs
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.
Check this to treat several spaces as a single space in the export
Ignore double spaces
For similar reasons you can choose to ignore two or more spaces in a row using this option.