This is the official manual for the latest Org-mode release.

Table of Contents

Next: , Previous: Extending ODT export, Up: OpenDocument Text export


12.12.5 Applying custom styles

The ODT export back-end comes with many OpenDocument styles (see Working with OpenDocument style files). To expand or further customize these built-in style sheets, either edit the style sheets directly or generate them using an application such as LibreOffice. The example here shows creating a style using LibreOffice.

Applying custom styles: the easy way
  1. Create a sample example.org file with settings as shown below, and export it to ODT format.
              #+OPTIONS: H:10 num:t
    
  2. Open the above example.odt using LibreOffice. Use the Stylist to locate the target styles, which typically have the ‘Org’ prefix. Open one, modify, and save as either OpenDocument Text (.odt) or OpenDocument Template (.ott) file.
  3. Customize the variable org-odt-styles-file and point it to the newly created file. For additional configuration options see Overriding factory styles.

    To apply and ODT style to a particular file, use the #+ODT_STYLES_FILE option as shown in the example below:

              #+ODT_STYLES_FILE: "/path/to/example.ott"
    

    or

              #+ODT_STYLES_FILE: ("/path/to/file.ott" ("styles.xml" "image/hdr.png"))
    
Using third-party styles and templates

The ODT export back-end relies on many templates and style names. Using third-party styles and templates can lead to mismatches. Templates derived from built in ODT templates and styles seem to have fewer problems.