Adding appendices in LaTeX

Help centre › LaTeX › Document layout · Packages: appendix

Write \appendix once, then start each appendix with \section{…} (or \chapter{…} in a report or book): from that point sections are lettered A, B, C. For headings and contents entries that read "Appendix A", use \begin{appendices} … \end{appendices} from the appendix package.

A complete example

A whole document: paste it into an empty project and compile it.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\section{Introduction}
The proof of the main result is in Appendix~\ref{app:proof}.
\section{Results}
The bound in Equation~\eqref{eq:bound} holds for every $n$.
\appendix
\counterwithin{equation}{section}
\section{Proof of the main result}\label{app:proof}
\begin{equation}
  \sum_{k=1}^{n} k = \frac{n(n+1)}{2} \label{eq:bound}
\end{equation}
\section{Additional data}
Further tables.
\end{document}

What \appendix does

\appendix is a switch, not an environment: it resets the section counter and numbers sections with capital letters. In a report or book it does the same for chapters, and headings read "Appendix A". Everything after it is appendix material, so put it after the main text and, if the journal wants appendices after the references, after the bibliography.

To number equations, figures and tables A.1, A.2, add \counterwithin{equation}{section} (and the same for figure and table) after \appendix, as in the example.

The appendix package

The appendices environment adds what \appendix alone does not: the title option prefixes each heading with "Appendix", toc adds an "Appendices" entry to the contents, titletoc prefixes contents entries with "Appendix", and page puts an "Appendices" page before them.

\documentclass{article}
\usepackage[toc,title]{appendix}
\begin{document}
\tableofcontents
\section{Main text}
See Appendix~\ref{app:data}.
\begin{appendices}
\section{Data tables}\label{app:data}
The full data.
\section{Questionnaire}
The questions asked.
\end{appendices}
\end{document}

A single appendix

With one appendix, many journals want the heading "Appendix" without a letter. In the article class, \appendix followed by \section*{Appendix} gives that, but an unnumbered section has no number to reference and its equations keep the main numbering.

Supplementary material in a separate file

Journals often want supplementary material as its own PDF. Compile it as a separate document; the xr package (\externaldocument{main}) lets it refer to labels in the main paper, and the paper to labels in it.

Common mistakes

In journal templates

Errors you may meet

Related

The examples on this page were compiled with pdfLaTeX to check that they work as shown. LaTeX quick reference · LaTeX errors explained