Next / Previous / Contents / NM Tech homepage

13.3. \chapter@

The \chapter@ command implements the full \chapter command. Again, most of this code is taken from the stock stylesheet.

Although this LaTeX definition has an optional argument, the \secdef command will always provide it (see Mittelbach, p. 32).

Called with:Invokes:
\chapter[short]{long} \chapter@[short]{long}
\chapter{long} \chapter@[long]{long}
nmtthesis2015.sty
%
% - - -   \ c h a p t e r @
%
\newcommand{\chapter@}[2][]%
{% Generate a numbered chapter heading.
%  #1 is the chapter title or short title if given.
%  #2 is the chapter title.
  \ifthenelse{\c@secnumdepth >\m@ne}
  {% Chapter is numbered
    \refstepcounter{chapter}
    \typeout{\chapter@orappendix\space\thechapter.}%
    \addcontentsline{toc}{chapter}%
    {\protect\numberline{\thechapter.}\MakeUppercase{#1}}%
  }% Chapter is numbered
  {% Chapter is unnumbered
    \addcontentsline{toc}{chapter}{\MakeUppercase{#1}}
  }% Chapter is unnumbered
  \chaptermark{#1}
  \addtocontents{lof}{\protect\addvspace{10pt}}
  \addtocontents{lot}{\protect\addvspace{10pt}}

All the above code is from the stock stylesheet. To build the chapter heading, we call Section 13.8, “\make@chapterhead. The \@afterheading command does post-heading cleanup and is from the stock stylesheet.

nmtthesis2015.sty
  \make@chapterhead{#2}%
  \@afterheading
}% End \chapter@