Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document

Formatting Information — An introduction to typesetting with LATEX

Appendix E: Implementing design

Section 2: Making changes to headings

One of the most visible things document designers decide upon are the section headings, including the part and chapter opening pages.

Parts and chapters (and appendixes, which tend to be formatted like chapters, but lettered instead of numbered) usually start on a right-hand page (left-hand page in left-to-right languages). Sections and subsections and below usually just start on the page where they occur. Parts and chapters control the resetting of numbering or lettering sequences, and also add entries to the Table of Contents (ToC).

This distinction means that parts and chapters are controlled by one set of macros in LATEX, and sections, subsections, and below by another set.

E.2.1 Parts and chapters

These are all in the default class files, so you should examine book.cls or report.cls while reading this.

Both the \part and \chapter commands come in starred versions \part* and \chapter* which do the same thing but omit the numbering. This is useful if you ever want to fake up something part-like or chapter-like but don't want to upset your existing numbering.

The \part command does this:

  1. the \@openright Boolean variable is used to decide if a new part needs an extra blank page in order to start on an odd-numbered page;

  2. the style for the page is set to plain (no page numbers or running headers and footers)

  3. the \@twocolumn Boolean variable is used to switch back to one-column mode for the part title;

  4. vertical filler is inserted to make sure the title is centered vertically;

  5. the appropriate \@part or \@spart macro is used, depending on whether or not this is a normal \part command or a \part* command.

\newcommand\part{%
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  \thispagestyle{plain}%
  \if@twocolumn
    \onecolumn
    \@tempswatrue
  \else
    \@tempswafalse
  \fi
  \null\vfil
  \secdef\@part\@spart}

E.2.2 Sections and subsections and below

These are all in the default class files, so you should examine book.cls or report.cls