Previous: , Up: Chapter Structuring   [Contents][Index]

5.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.

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:

@include somefile.texi

(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 @value).

As a practical matter, you generally only want to raise or lower large chunks, usually in external files as shown above. The final result has to have menus that take the raising and lowering into account, so you cannot just arbitrarily sprinkle @raisesections and @lowersections commands throughout the document.

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 makeinfo’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.

Previous: , Up: Chapter Structuring   [Contents][Index]