Heading
A heading gives your document its structure: chapters, sections, subsections. LaTeX numbers them, and the table of contents is built from them.
Levels
Select a heading and choose its level in the right column.
| Level | LaTeX | Numbered as | In the table of contents |
|---|---|---|---|
| Chapter | \chapter | 1, 2, 3… — printed "Chapter 1" above the title | Yes |
| H1 | \section | 1, 2… or 2.1, 2.2… inside chapter 2 | Yes |
| H2 | \subsection | 1.1, 1.2… or 2.1.1… inside chapter 2 | Yes |
| H3 | \subsubsection | 1.1.1, 1.1.2… in a document without chapters; not numbered in one that has chapters | No |
A new heading is an H2. Change the level at any time; the text is kept.
Chapters
A chapter starts a new page and prints its number on a line of its own ("Chapter 1", or "Chapitre 1" in a French document) above its title.
A chapter also restarts the numbering of the sections, figures, tables, equations and theorems that follow, and prefixes them with its number: Figure 2.1, equation (2.3). See Numbering and references.
A document does not need chapters. Without any, sections are numbered 1, 2, 3 and nothing is prefixed.
Numbered or plain
Plain removes the number. A plain heading:
- prints no number;
- does not count: the next numbered heading continues from the last numbered one;
- is left out of the table of contents;
- cannot be the target of a cross-reference;
- if it is a chapter, does not restart the numbering of what follows.
It is the right choice for an introduction, a conclusion, acknowledgements or an appendix title you do not want numbered.
What a heading can contain
- Bold, italic, underline, strikethrough.
- Formulas —
Ctrl+M, or type$…$. - Cross-references and citations.
A heading is one line of text. Enter at the end of a heading starts a paragraph below it.
What it cannot do
- No footnote in a heading. The footnote button is not offered there.
- No colour in a heading. The colour button is not offered there either: a coloured title would colour its line of the table of contents.
- No chapter inside a column. A chapter starts a new page, which a column cannot do: a chapter placed in a column is set as a section, and becomes a chapter again when you move it out.
- No heading inside a theorem.
- No custom numbering (letters, Roman numerals) and no appendix mode.
- H3 is not numbered in a document that has chapters, whatever the Numbered/Plain setting: subsections already read 2.1.1 there, and a fourth level (2.1.1.1) is not printed. One numbered chapter anywhere in the document is enough. Without chapters, H3 is numbered 1.1.1 and can be referenced.
What it prints
\chapter{Groups}\label{blk-…}
\section{Definitions}\label{blk-…}
\subsection*{A plain subsection}The \label is what cross-references point at. A plain heading uses the starred command and has no label.