I want to add roman page numbering to all the pages up to the end of the table of contents, apart from the title page. So I did the following, which works, apart from the fact that the abstract does not have any page number.
\begin{document}
\pagenumbering{roman}
\maketitle
\include{abstract}
\tableofcontents
\newpage
\pagenumbering{arabic}
The abstract.tex
file contains \begin{abstract}
and \end{abstract}
.
So I tried to follow the solution to the question here which seems to be asking the exact same question.
And in my abstract tex file I put:
\begin{abstract}
\thispagestyle{plain}
My abstract...
\end{abstract}
This does add page 'i' to the Abstract page. However, the problem is that subsequent pages in the roman numbering part, such as the table of contents are also getting page 'i' again (that is before changing to arabic numbering).
So essentially I am getting:
Abstract – Page i,
TOC – Page i
While I want
Abstract – Page i,
TOC – Page ii
Why is the counter getting reset to 1 (before changing to arabic numbering) and not continuing from where it was in the abstract?
Best Answer
\pagenumbering
- changes should be done after a\clearpage
(unless it's the first change right after the start)\pagenumbering
always resets the page counter to1
, see the definition\global\c@page \@ne
is basicallyPlain TeX
for\setcounter{page}{1}
Now the real culprit for
report
is that it setstitlepage
option, i.e.abstract
uses thetitlepage
environment internally, which is defined to reset the page number at the end. Some code fromlatex.ltx
Here the real code
The whole issue can be cured if
titlepage
is redefined to take care for the special needs of the O.P. by setting\@abstractmode
to true and setting the pagestyle and stepping the page counter accordingly, but do no reset of the page counter at the end of thetitlepage
environment.