Next: , Previous: , Up: Top   [Contents][Index]


6 Sectioning

Structure your text into divisions: parts, chapters, sections, etc. All sectioning commands have the same form, one of:

sectioning-command{title}
sectioning-command*{title}
sectioning-command[toc-title]{title}

For instance, declare the start of a subsection as with \subsection{Motivation}.

The table has each sectioning-command in LaTeX. All are available in all of LaTeX’s standard document classes book, report, and article, except that \chapter is not available in article.

Sectioning unitCommandLevel
Part\part-1 (book, report), 0 (article)
Chapter\chapter0
Section\section1
Subsection\subsection2
Subsubsection\subsubsection3
Paragraph\paragraph4
Subparagraph\subparagraph5

All these commands have a *-form that prints title as usual but is not numbered and does not make an entry in the table of contents. An example of using this is for an appendix in an article . The input \appendix\section{Appendix} gives the output ‘A Appendix’ (see \appendix). You can lose the numbering ‘A’ by instead entering \section*{Appendix} (articles often omit a table of contents and have simple page headers so the other differences from the \section command may not matter).

The section title title provides the heading in the main text, but it may also appear in the table of contents and in the running head or foot (see Page styles). You may not want the same text in these places as in the main text. All of these commands have an optional argument toc-title for these other places.

The level number in the table above determines which sectional units are numbered, and which appear in the table of contents. If the sectioning command’s level is less than or equal to the value of the counter secnumdepth then the titles for this sectioning command will be numbered (see Sectioning/secnumdepth). And, if level is less than or equal to the value of the counter tocdepth then the table of contents will have an entry for this sectioning unit (see Sectioning/tocdepth).

LaTeX expects that before you have a \subsection you will have a \section and, in a book, that before a \section you will have a \chapter. Otherwise you can get a something like a subsection numbered ‘3.0.1’.

LaTeX lets you change the appearance of the sectional units. As a simple example, you can change the section numbering to upper-case letters with \renewcommand\thesection{\Alph{section}} in the preamble (see \alph \Alph \arabic \roman \Roman \fnsymbol). CTAN has many package that make this adjustment easier, including titlesec.

Two counters relate to the appearance of sectioning commands.

secnumdepth

Controls which sectioning commands are numbered. Suppress numbering of sectioning at any depth greater than level \setcounter{secnumdepth}{level} (see \setcounter). See the above table for the level numbers. For instance, if the secnumdepth is 1 in an article then a \section{Introduction} command will produce output like ‘1 Introduction’ while \subsection{Discussion} will produce output like ‘Discussion’, without the number. LaTeX’s default secnumdepth is 3 in article class and  2 in the book and report classes.

tocdepth

Controls which sectioning units are listed in the table of contents. The setting \setcounter{tocdepth}{level} makes the sectioning units at level be the smallest ones listed (see \setcounter). See the above table for the level numbers. For instance, if tocdepth is 1 then the table of contents will list sections but not subsections. LaTeX’s default secnumdepth is 3 in article class and  2 in the book and report classes.


Unofficial LaTeX2e reference manual