Contents | Start | End | Previous: KB0393: Why does the contents hierarchy in my PDF show incorrectly in Adobe Digital Editions? | Next: KB0395: Why are my headings numbered twice in ODT?


KB0394: How are outline levels used?

This topic explains what outline levels are used for and some details that may not be obvious, particularly for ODT generation.

Any paragraph style in Jutoh can have an outline level from 1 to 10. This is most useful for heading styles, such as "Heading 1" (level 1), "Heading 2" (level 2) and so on.

For HTML, Kindle and Epub output, these levels are used to indicate whether a heading ("h1"..."h6") or a paragraph tag ("p") will be used. If no outline level is available, a "p" tag will be used.

For OpenDocument (ODT) output, the outline level is generated for the paragraph or heading within the actual content (using the "text:outline-level" tag in the paragraph or heading: again using the presence of an outline level to determine whether to use a "text:h" or "text:p" element). However, the outline level is not necessarily stored in the paragraph or heading style. The style definition will only get the "style:default-outline-level" attribute if the paragraph style name matches the heading style name specified in the document outline style.

This outline style, which can be edited via Project Properties/Fields & Numbering/Edit Document Outline Style, determines how an outline might be generated from headings in an ODT document. It tells the word processor (such as LibreOffice) how to do automatic numbering of headings: for example, what kind of numbering to use at any given heading level. It also allows the word processor to find the text of a chapter heading when you use the chapter field in a header or footer. For example, inside a chapter using a "Heading 1" heading, the word processor will look for a level 1 heading according to the outline style, and extract the heading text. So if you use automatic numbering or chapter fields, make sure the outline style specifies the correct heading styles and numbering options.

The outline is also used to generate a 'logical' table of contents in a PDF for use by applications such as Adobe Digital Editions in PDF display mode. Note that if there are multiple styles with the same level, it can cause Adobe Digital Editions to display an incorrect hierarchy, so if you use multiple level 1 styles, you can use the configuration option Paragraph style substitutions to rename styles during compilation, e.g. with "Index Heading:Heading 1".

The outline style is also used by Jutoh to specify how the Book outline mode of the Inspector will extract headings to show the heading hierarchy.


Contents | Start | End | Previous: KB0393: Why does the contents hierarchy in my PDF show incorrectly in Adobe Digital Editions? | Next: KB0395: Why are my headings numbered twice in ODT?