13.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.
β
the easy wayCreate a sample β
example.org
β file with settings as shown below, and export it to ODT format.#+OPTIONS: H:10 num:t
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.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 an ODT style to a particular file, use the β
ODT_STYLES_FILE
β keyword 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.