How to add roman numbers to the appendix pages in LaTex?

Learn how to add roman numbers to the appendix pages in latex? with practical examples, diagrams, and best practices. Covers latex, pdflatex, roman-numerals development techniques with visual expla...

Adding Roman Numerals to Appendix Pages in LaTeX

Hero image for How to add roman numbers to the appendix pages in LaTex?

Learn how to correctly number your appendix pages with Roman numerals in LaTeX documents, ensuring proper formatting and table of contents integration.

When preparing academic papers, theses, or technical reports in LaTeX, it's common practice to use different numbering schemes for various sections. While the main body typically uses Arabic numerals, appendices often require Roman numerals (i, ii, iii, etc.). This article will guide you through the process of implementing Roman numeral pagination specifically for your appendix pages, ensuring a professional and correctly formatted document.

Understanding LaTeX Page Numbering

LaTeX provides powerful mechanisms for controlling page numbering. The \pagenumbering command is central to this, allowing you to switch between different numbering styles. Common styles include arabic (1, 2, 3), roman (i, ii, iii), Roman (I, II, III), alph (a, b, c), and Alph (A, B, C). To apply Roman numerals to your appendix, you'll need to strategically place this command within your document structure.

flowchart TD
    A[Start Document] --> B{Main Content}
    B --> C[\pagenumbering{arabic}]
    C --> D[\chapter{Introduction}]
    D --> E[...Main Chapters...]
    E --> F[\appendix]
    F --> G[\pagenumbering{roman}]
    G --> H[\chapter*{Appendix A}]
    H --> I[...Appendix Content...]
    I --> J[End Document]

Typical LaTeX document flow with page numbering changes

Implementing Roman Numerals for Appendices

The key to achieving Roman numeral pagination for your appendices lies in using the \appendix command, followed by \pagenumbering{roman}. The \appendix command itself resets the chapter counter and changes its formatting, while \pagenumbering{roman} ensures that subsequent pages are numbered with lowercase Roman numerals. If you prefer uppercase Roman numerals, use \pagenumbering{Roman} instead.

\documentclass{article}

\begin{document}

\tableofcontents

\section{Introduction}
This is the introduction to the main document. Page numbers will be Arabic.
\newpage

\section{Main Content}
More main content here. The page numbering continues as Arabic.
\newpage

\appendix
\pagenumbering{roman}

\section*{Appendix A: Supplementary Data}
This is the first appendix. Pages here will be numbered with lowercase Roman numerals.
\newpage

\section*{Appendix B: Additional Figures}
This is the second appendix. Page numbering continues with Roman numerals.

\end{document}

LaTeX example for adding Roman numerals to appendices

Handling Table of Contents (ToC) Entries

When you use \section*{...} for your appendix titles (to prevent them from being numbered as sections within the appendix), they won't automatically appear in the Table of Contents. To include them, you need to manually add them using \addcontentsline{toc}{section}{Appendix Title}. This command takes three arguments: the file to write to (toc for Table of Contents), the level of the entry (section, chapter, etc.), and the text for the entry.

\documentclass{article}

\begin{document}

\tableofcontents

\section{Introduction}
Main content.
\newpage

\appendix
\pagenumbering{roman}

\section*{Appendix A: Data Tables}
\addcontentsline{toc}{section}{Appendix A: Data Tables}
Content for Appendix A.
\newpage

\section*{Appendix B: Code Snippets}
\addcontentsline{toc}{section}{Appendix B: Code Snippets}
Content for Appendix B.

\end{document}

Adding unnumbered appendices to the Table of Contents