Customizing sectional tags

By default, TeXmacs provides the standard sectional tags from LaTeX part, chapter, section, subsection, subsubsection, paragraph, subparagraph, as well as the special tag appendix. TeXmacs also implements the unnumbered variants part*, chapter*, etc. and special section-like tags bibliography, table-of-contents, the-index, the-glossary, list-of-figures, list-of-tables.

Remark 1. Currently, the sectional tags take one argument, the section title, but a second argument with the body of the section is planned to be inserted in the future (see the experimental structured-section package). For this reason (among others), style files should never redefine the main sectional tags, but rather customize special macros which have been provided to this effect.

From a global point of view, an important predicate macro is sectional-short-style. When it evaluates to true, then appendices, tables of contents, etc. are considered to be at the same level as sections. In the contrary case, they are at the same level as chapters. Typically, articles use the short sectional style whereas book use the long style.

The rendering of a sectional tag x is controlled through the macros x-sep, x-title and x-numbered-title. The x-sep macro prints the separator between the section number and the section title. It defaults to the macro sectional-sep, which defaults in its turn to a wide space. For instance, after redefining

<assign|sectional-sep|<macro|>>

sectional titles would typically look like

1 – Hairy GNUs

The x-title and x-numbered-title macros respectively specify how to render unnumbered and numbered section titles. Usually, the user only needs to modify x-title, since x-numbered-title is based on x-title. However, if the numbers have to be rendered in a particular way, then it may be necessary to redefine x-numbered-title. For instance, consider the redefinition

< assign | subsection-numbered-title | < macro | name |

<\sectional-normal|

<with|font-series|bold|<the-subsection>. >name

>

> >

This has the following effect on the rendering of subsection titles:

2.3. Very hairy GNUs

Notice that the section-base package provides several useful helper macros like sectional-normal.

Remark 2. Sectional titles can either be rendered in a “short” or in the “long” fashion. By default, paragraphs and subparagraphs use the short rendering, for which the body starts immediately at the right of the title:

My paragraph
Blah, blah, and more blahs...

All other sectional tags use the long rendering, in which case the section title takes a separate line on its own:

My section

Blah, blah, and more blahs...

We do not recommend to modify the standard settings (i.e. to render paragraphs in a long way or sections in a short way). If you really want to do so, then we recommend to redefine the corresponding environment variables enrich-x-long. This will ensure upward compatibility when sectional tags will take an additional argument (see remark ?).

Besides their rendering, several other aspects of sectional tags can be customized:

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".