Take this document:
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\title{\LaTeX\ page numbering repro}
\author{Hendrik}
\begin{document}
%\pagenumbering{roman}
\maketitle
\begin{abstract}
\blindtext
\end{abstract}
\tableofcontents
%\pagenumbering{arabic}
\chapter{Chapter 1}
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\chapter{Chapter 2}
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\chapter{Chapter 3}
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\end{document}
It compiles correctly, such that
However, I would like everything before chapter 1 to use roman numbers, such that chapter 1 starts at page 1. To accomplish that, I added the \pagenumbering{roman}
and \pagenumbering{arabic}
lines. If you uncomment them, the document still compiles, but there is a problem.
I want the second page of the ToC to be numbered page ii instead. What is going on here?
You used \pagenumbering{arabic}
when you were still on the page of the toc. The page break only happens when the chapter starts. So you either have to start the new page manually (e.g. \clearpage
) or use it when the chapter has already started the new page.
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\title{\LaTeX\ page numbering repro}
\author{Hendrik}
\begin{document}
\pagenumbering{roman}
\maketitle
\begin{abstract}
\blindtext
\end{abstract}
\tableofcontents
\chapter{Chapter 1}
\pagenumbering{arabic}
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\chapter{Chapter 2}
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\chapter{Chapter 3}
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\section{Section}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\subsection{Subsection}
\Blindtext
\end{document}