2.5.4 Preamble

The preamble starts at the beginning of the Texinfo file and continues until the first directly output material. It typically includes the file header (see Texinfo File Header), the @copying block specifying the document permissions (see @copying: Declare Copying Permissions) and the @titlepage specification (see Title and Copyright Pages).

The preamble may contain commands that affect document formatting as a whole but which do not produce output, or do not produce output straight away, such as @settitle (see @settitle: Set the Document Title), @documentlanguage, (see @documentlanguage ll[_cc]: Set the Document Language), commands setting the headings, controlling indentation or hyphenation, or the table of contents (see Generating a Table of Contents).

Any text that starts a paragraph, @-commands that are formatted as quotations, tables, lists and so on, and @node (see Nodes) and chapter structuring commands (see Chapter Structuring) end the preamble.

The concept of the preamble is significant for LaTeX output, as the \begin{document} line is output at the end of the preamble.

In plaintext, the preamble is simply output as usual at the beginning of the document; for example, a @contents in the preamble is output as the table of contents (see Generating a Table of Contents).

There is not much special treatment of the preamble for HTML and Info output either. However, some settings current at the very end of the preamble may be used for the document as a whole, regardless of what follows. This may apply to commands specifying the indentation, or the language (see @documentlanguage ll[_cc]: Set the Document Language).

For example, for the following document, the HTML and Info copying comments are formatted with @documentlanguage set to ‘pt’, as it is the last @documentlanguage before the end of the preamble.

\input texinfo
@documentlanguage fr

The copying information @error{} some text
@end copying

@documentlanguage pt

Text ending the preamble

@documentlanguage de

@node Top