Appendix in LaTeX: \appendix, Numbering and the appendix Package
Quick answer
- Basic appendix: write
\appendixafter the main text, then\section{...}(article) or\chapter{...}(report, book). Numbering switches to A, B, C. - “Appendix A” headings and a TOC entry in an article:
\usepackage[toc,page,title]{appendix}with\begin{appendices} ... \end{appendices}. - Equations (A.1):
\numberwithin{equation}{section}(amsmath) right after\appendix; figures with\counterwithin{figure}{section}. - Rename:
\renewcommand{\appendixname}{Supplement}.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\tableofcontents
\section{Introduction}
Main text. The proof is in Appendix~\ref{app:proofs}.
\appendix
\numberwithin{equation}{section}
\section{Proofs}\label{app:proofs} % numbered A
\begin{equation} a^2 + b^2 = c^2 \end{equation} % (A.1)
\section{Additional Data} % numbered B
\end{document}An appendix in LaTeX takes one command. \appendix marks the point where the appendices start, and every \section or \chapter after it is lettered instead of numbered. Everything else — an “Appendices” heading in the table of contents, the word “Appendix” in article headings, equations numbered (A.1), a single unnumbered appendix — is a matter of a few settings or the appendix package. This guide shows each, for article, report and book, and fixes the errors that come up along the way.
The \appendix Command
\appendix is a switch, not an environment: it resets the section (or chapter) counter and changes its numbering to capital letters. It does not print anything itself. What happens next depends on the class:
| Class | Appendix heading | Heading output | TOC entry |
|---|---|---|---|
| article | \section{Proofs} | A Proofs | A Proofs |
| report, book | \chapter{Proofs} | Appendix A / Proofs | A Proofs |
article + [title]{appendix} | \section{Proofs} in appendices | Appendix A Proofs | A Proofs (titletoc: Appendix A Proofs) |
Appendix in a report or book
\documentclass{report}
\usepackage{amsmath}
\begin{document}
\tableofcontents
\chapter{Introduction}
\begin{equation} E = mc^2 \end{equation} % (1.1)
\chapter{Results}
See Appendix~\ref{app:data} for the raw data.
\appendix
\chapter{Raw Data}\label{app:data} % "Appendix A Raw Data"
\section{Measurements} % A.1
\begin{equation} F = ma \end{equation} % (A.1)
\chapter{Code Listings} % "Appendix B Code Listings"
\end{document}In report and book, sections inside an appendix chapter are numbered A.1, A.2, and equations, figures and tables are already numbered per chapter, so they become (A.1) without extra work. A bibliography placed after the appendices uses an unnumbered chapter and is not lettered.
The appendix Package: \begin{appendices}
The appendix package adds an appendices environment and options for the parts that \appendix leaves out. Put the appendices inside the environment instead of after \appendix:
\documentclass{article}
\usepackage[toc,page,title,titletoc]{appendix}
\begin{document}
\tableofcontents
\section{Introduction}
Main text.
\begin{appendices}
\section{Proofs} % heading: "Appendix A Proofs"
Proof of the main theorem.
\section{Survey Questions} % heading: "Appendix B Survey Questions"
The full questionnaire.
\end{appendices}
\end{document}| Option | Effect |
|---|---|
toc | Adds an “Appendices” heading to the table of contents |
page | Prints an “Appendices” title before the first appendix (a page of its own in report and book) |
title | Puts “Appendix” before each letter in the headings (article) |
titletoc | Puts “Appendix” before each letter in the table of contents |
header | Puts “Appendix” in the running head |
For appendices at the end of each chapter of a thesis, the package also provides subappendices: used inside a chapter, its sections are numbered 2.A, 2.B. The headings “Appendices” come from \appendixtocname and \appendixpagename, which you can redefine like \appendixname.
Appendix in the Table of Contents
Lettered appendices made with \section or \chapter appear in the table of contents automatically. The usual adjustments are an “Appendices” line above them (the package's toc option) and the word “Appendix” in each entry (titletoc). For a single appendix without a letter, use a starred heading and add the entry by hand:
\documentclass{article}
\begin{document}
\tableofcontents
\section{Introduction}
Main text.
\section*{Appendix}
\addcontentsline{toc}{section}{Appendix}
The one appendix, unnumbered, but listed in the contents.
\end{document}More on adjusting entries, depth and titles in the table of contents guide.
Numbering Equations, Figures and Tables in the Appendix
In an article, equations, figures and tables are numbered through the whole document, so the first equation in appendix A might be (14). Most style guides want (A.1) instead. Tie the counters to the section right after \appendix:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\section{Main Result}
\begin{equation} x + y = z \end{equation} % (1)
\appendix
\numberwithin{equation}{section} % equations (A.1), (A.2), ...
\counterwithin{figure}{section} % figures A.1, A.2, ...
\counterwithin{table}{section} % tables A.1, A.2, ...
\section{Derivations}
\begin{equation} x = z - y \end{equation} % (A.1)
\begin{table}[h]
\centering
\begin{tabular}{cc} 1 & 2 \end{tabular}
\caption{Numbered A.1.}
\end{table}
\end{document}\numberwithin comes from amsmath; \counterwithin is built into LaTeX. Placed after \appendix, they only affect the appendices and the main text keeps its numbering. For theorem numbering in appendices, see theorems and proofs, and for equation numbers in general equation numbering.
Referencing and Renaming the Appendix
Label an appendix like any section and refer to it with Appendix~\ref{app:proofs}, which prints “Appendix A”. With the cleveref package, \Cref{app:proofs} after \appendix writes the word itself. To change the word “Appendix” (in report and book headings, and with the package's title option), redefine \appendixname:
\documentclass{report}
\usepackage[english]{babel}
\addto\captionsenglish{\renewcommand{\appendixname}{Supplement}}
\begin{document}
\chapter{Introduction}
Details are in Supplement~\ref{app:extra}.
\appendix
\chapter{Extra Material}\label{app:extra} % "Supplement A"
\end{document}Without babel, a plain \renewcommand{\appendixname}{Supplement} in the preamble is enough. With babel, the \addto\captionsenglish wrapper is needed because babel sets the name again at \begin{document}.
Common Errors and Fixes
| Message or symptom | Cause | Fix |
|---|---|---|
| Appendix numbered 5, 6 instead of A, B | \appendix missing | Add \appendix before the first appendix heading |
Undefined control sequence at \chapter | \chapter in the article class | Use \section for appendices in an article |
| No “Appendix” before the letter in an article | The article class only letters the sections | \usepackage[title]{appendix} with the appendices environment |
\begin{appendix} … \end{appendix} | \appendix is a command; it happens to work as an environment in the standard classes but not in every class | Write \appendix once, or use \begin{appendices} from the package |
| Equations in the appendix numbered (12) instead of (A.1) | Article numbers equations through the document | \numberwithin{equation}{section} after \appendix |
| Appendix missing from the table of contents | Starred heading such as \section*{Appendix} | Add \addcontentsline{toc}{section}{Appendix} |
| pdfTeX warning: destination with the same identifier (name{section.1}) has been already used | The section counter was reset by hand (\setcounter{section}{0}) instead of with \appendix | Use \appendix, which hyperref knows about |
Renamed \appendixname has no effect | babel resets the name at \begin{document} | Wrap it: \addto\captionsenglish{\renewcommand{\appendixname}{...}} |
Frequently Asked Questions
How do I add an appendix in LaTeX?
Write \appendix after the main text, then start each appendix with \section (in article) or \chapter (in report and book) as usual. From that point the numbering switches to letters: sections become A, B, C and chapters become Appendix A, Appendix B. \appendix is a command, not an environment, so it has no \end.
How do I add the appendix to the table of contents?
Appendix sections and chapters made with \section and \chapter after \appendix appear in the table of contents automatically, as A, B and so on. For an “Appendices” heading in the contents, load \usepackage[toc]{appendix} and wrap the appendices in \begin{appendices} … \end{appendices}; add titletoc to show the word Appendix before each entry.
How do I get “Appendix A” instead of just “A” in an article?
In the article class, \appendix only changes the numbers to letters. Load the appendix package with the title option, \usepackage[title]{appendix}, and put the sections inside \begin{appendices} … \end{appendices}; the headings then read “Appendix A”. The titletoc option does the same in the table of contents. In report and book, chapters already say “Appendix A”.
How do I number equations as (A.1) in the appendix?
In an article, equations keep counting from the main text. Write \numberwithin{equation}{section} (from amsmath) right after \appendix, and equations in appendix A become (A.1), (A.2). Do the same for figures and tables with \counterwithin{figure}{section}. In report and book, equations are already numbered by chapter, so they become (A.1) automatically.
How do I add a single appendix without a letter?
Use an unnumbered heading and add it to the table of contents by hand: \section*{Appendix} followed by \addcontentsline{toc}{section}{Appendix}. Do not use \appendix in that case, since a lone lettered “A” looks odd when there is no B.
How do I rename the appendix in LaTeX?
Redefine \appendixname, which is “Appendix” in English: \renewcommand{\appendixname}{Supplement}. When babel is loaded, put the change in \addto\captionsenglish{…} so babel does not reset it. The appendix package also provides \appendixtocname and \appendixpagename for the “Appendices” headings.
Next Steps
- Sections and Chapters – Headings, numbering and starred sections
- Table of Contents – Entries, depth and custom titles
- Equation Numbering – \numberwithin, \tag and labels
- Bibliography Examples – References before or after the appendix
- Two Columns in LaTeX – twocolumn, multicol and table spans
- Learn LaTeX: Tutorial for Beginners – The basics, from the first document up
Free LaTeX Tools
- LaTeX Preview – Compile an appendix and check the numbering
- AI LaTeX Generator – Generate LaTeX from text descriptions
- LaTeX Symbols Reference – Browse math operators and special characters
Related Articles
Angle Brackets ⟨ ⟩: Symbol, Copy and Paste, and LaTeX
Compile LaTeX from Claude Code or Cursor with the Octree MCP Server
Diameter Symbol (⌀): Meaning, ⌀ vs Ø, and How to Type It on Windows, Mac, Word, LaTeX
LaTeX on iPad: How to Write and Compile LaTeX on a Tablet
Finish your thesis appendices with AI
Octree's AI editor sets up lettered appendices, fixes their numbering and table of contents entries, and compiles your document in seconds.
Try Octree Free →