11

I'm writing a big report, and I have a minor problem with the page numbering in my table of contents.

MWE: (sorry for the many \chapters, it is to ensure a two-page TOC)

\documentclass[11pt,a4paper,openright,twoside]{report}

% Fixing the appearance of the footer in the empty pages in between chapters.
\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{%
  \clearpage
  {\pagestyle{empty}\origdoublepage}%
}
\let\cleardoublepage\clearemptydoublepage
% Finished fixing appearance

\begin{document}

\begin{titlepage}
This is the title page
\mbox{}
\end{titlepage}

\cleardoublepage
\pagenumbering{roman} % Yay, roman numbering (i, ii, iii, iv) for the abstract and table of contents.
\begin{center}
\subsection*{Abstract}
\end{center}
Abstract text

\cleardoublepage
\tableofcontents

\chapter{First chapter}
\pagenumbering{arabic} % And moving back to arabic numbering (1,2,3,4) for the body.
\setcounter{page}{1}   % Starting the page numbering at 1 again.
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Second chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Third chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Fourth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Fifth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Sixth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Seventh chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Eight chapter}
\section{First section}
\section{Second section}
\section{Third section}
\end{document}

I want my titlepage, abstract, and first page of TOC to be a right-hand page, as well as every first page of a chapter. That works. The abstract nicely has i for page number. However, I want the first page of my TOC to have page number ii, rather than iii which it is now (the second toc page should be iii). I've tried adding

\setcounter{page}{2}

immediately before or after \tableofcontents, but that doesn't work. Immediately before produces an extra unwanted white-page (and the toc starts at iii), while immediately after sets the second page of the toc to page number ii, while the first stays at iii.

Any suggestions on how I can have my toc start at page ii here?

2 Answers 2

14

I don't think it's a good idea, but I know that some institutions have crazy requirements.

If you only need plain lowercase roman numerals, it's easy. See the comment in the code.

I also added a simpler solution for the problem of getting “really empty pages”: load the emptypage package. Also, \pagenumbering{arabic} should be issued before the first chapter.

\documentclass[11pt,a4paper,openright,twoside]{report}

\usepackage{emptypage}

\begin{document}

\begin{titlepage}
This is the title page
\mbox{}
\end{titlepage}

\cleardoublepage
\pagenumbering{roman} 

\begin{center}
\large\bfseries Abstract
\end{center}

Abstract text

\cleardoublepage
% Let's change \thepage so it prints one less than
% the real page number; \pagenumbering{arabic}
% will redefine it to the right meaning afterwards.
\renewcommand\thepage{\romannumeral\numexpr\value{page}-1\relax}

\tableofcontents

\cleardoublepage
\pagenumbering{arabic}
\chapter{First chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Second chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Third chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Fourth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Fifth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Sixth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Seventh chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Eight chapter}
\section{First section}
\section{Second section}
\section{Third section}
\end{document}
1
  • Thanks, it works. Is there any specific reason \pagenumbering{arabic} should be before the first \chapter? I see no difference in output between your MWE and placing \pagenumbering{arabic} after the first \chapter while removing the \cleardoublepage
    – IceRabbit
    Commented Jan 17, 2014 at 6:23
8

It's more complicating than one can think at a first glance...

First of all, remove the option openright when loading the document class and load the package etoolbox.

Then insert \setcounter{page}{2} just before \tableofcontents.

At this point insert the following lines just after the first chapter:

\patchcmd{\chapter}
  {\clearpage}
  {\cleardoublepage}
  {}
  {}

Note that \setcounter{page}{1} after \pagenumbering{arabic} is not needed and \cleardoublepage can be redefined in a simple manner:

\let\origdoublepage\cleardoublepage
\renewcommand{\cleardoublepage}{%
  \clearpage
  {\pagestyle{empty}\origdoublepage}%
}

MWE:

\documentclass[11pt,a4paper,twoside]{report}
\usepackage{etoolbox}

% Fixing the appearance of the footer in the empty pages in between chapters.
\let\origdoublepage\cleardoublepage
\renewcommand{\cleardoublepage}{%
  \clearpage
  {\pagestyle{empty}\origdoublepage}%
}
% Finished fixing appearance

\begin{document}

\begin{titlepage}
This is the title page
\mbox{}
\end{titlepage}

\cleardoublepage
\pagenumbering{roman} % Yay, roman numbering (i, ii, iii, iv) for the abstract and table of contents.
\begin{center}
\subsection*{Abstract}
\end{center}
Abstract text

\cleardoublepage
\setcounter{page}{2}
\tableofcontents

\chapter{First chapter}
\pagenumbering{arabic} % And moving back to arabic numbering (1,2,3,4) for the body.
\patchcmd{\chapter}
  {\clearpage}
  {\cleardoublepage}
  {}
  {}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Second chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Third chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Fourth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Fifth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Sixth chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Seventh chapter}
\section{First section}
\section{Second section}
\section{Third section}

\chapter{Eight chapter}
\section{First section}
\section{Second section}
\section{Third section}
\end{document}  

Output:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .