5.1 Output Units

We will call the main unit of output documents a document output unit. An output unit’s association with output files is determined by the split options (see Splitting Output in Texinfo). This section describes precisely how these output units work, with details for customization.

The output units are:

Normal output units

These are composed of normal sections and nodes. Usually a node is associated with a following sectioning command, while a sectioning command is associated with a previous node; they both together make up the output unit. Either the node or the sectioning command is considered to be the main element component, depending on the values of the customization variables USE_NODES (see HTML Output Structure Customization in Texinfo).

For example, when generating Info, the nodes are the main elements; when generating HTML, either case may happen (see Two Paths in Texinfo).

Top output unit

The top output unit is the highest output unit in the document structure. If the document has an @top section (see @top Command in Texinfo), it is the output unit associated with that section; otherwise, it is the output unit associated with the document’s @node Top (see The Top Node in Texinfo). If there is no @node Top, the first output unit in the document is the top output unit. The Top output unit is also a normal output unit.

Miscellaneous output units

The remaining output units are associated with different files if the document is split, and also if MONOLITHIC is not set (see ‘texinfo’ in Texinfo). There are four such miscellaneous output units, also called special output units:

  1. Table of contents
  2. Short table of contents, also called Overview
  3. Footnotes page
  4. About page

More details:

  • The Table of contents should only be formatted if @contents is present in the document.
  • Similarly the Short table of contents should only appear if @shortcontents or @summarycontents is present.
  • The customization variables contents and shortcontents may be set to trigger the output of the respective output units.
  • If CONTENTS_OUTPUT_LOCATION is set to ‘separate_element’, the Table of contents and Short table of contents output units are separate (see Contents and Short Table of Contents Customization). Otherwise the Table of contents and Short table of contents are directly included within the document, at locations depending on the specific CONTENTS_OUTPUT_LOCATION value (see ‘texinfo’ in Texinfo.
  • When generating HTML, the Footnotes page should only be present if the footnotes appear on a separate page (see Footnote Styles in Texinfo). However, a footnote output unit is present if the document is not split.
  • The About page shouldn’t be present for documents consisting of only one sectioning element, or for monolithic documents without navigation information, or if DO_ABOUT is not set.

It is common not to have anything but normal output units, especially in case of monolithic output.

A last type of output units exist, “virtual” output units corresponding to directions to external manual nodes. They are not part of the output, but can be used in directions. They are often referred to as external node units or external manual units. These units do not exist in the document output, therefore there are no functions called to format those output units. They can appear in directions formatting (see Navigation Panel Button Formatting).