4.12 Raise/lower Sections: @raisesections and @lowersections

The @raisesections and @lowersections commands implicitly raise and lower the hierarchical level of following chapters, sections and the other sectioning commands (excluding parts).

That is, the @raisesections command changes sections to chapters, subsections to sections, and so on. Conversely, the @lowersections command changes chapters to sections, sections to subsections, and so on. Thus, a @lowersections command cancels a @raisesections command, and vice versa.

As a practical matter, you generally only want to raise or lower large chunks, usually in external files. You can use @lowersections to include text written as an outer or standalone Texinfo file in another Texinfo file as an inner, included file (see Include Files). Typical usage looks like this:

@lowersections
@include somefile.texi
@raisesections

(Without the @raisesections, all the subsequent sections in the main file would also be lowered.)

If the included file being lowered has a @top node, you’ll need to conditionalize its inclusion with a flag (see @set and @value).

Any menus in the final result have to take the raising and lowering into account, so arbitrarily sprinkling @raisesections and @lowersections commands throughout the document will likely lead to errors (unless the menus in your document are all generated automatically).

Repeated use of the commands continues to raise or lower the hierarchical level a step at a time. An attempt to raise above ‘chapter’ reproduces chapter commands; an attempt to lower below ‘subsubsection’ reproduces subsubsection commands. Also, lowered subsubsections and raised chapters will not work with texi2any’s feature of implicitly determining node pointers, since the menu structure cannot be represented correctly.

Write each @raisesections and @lowersections command on a line of its own.