I have a LaTeX report with title, abstract and the main part. I want to have numbers on every single page starting from the first. How do I do that? The way it is now is that the first page is not numbered and there is a numbering before the abstract which starts from 1 after the abstract.
[Tex/LaTex] Force page numbering on every page
header-footerpage-numbering
Related Solutions
article.cls
defines abstract
environment using titlepage
. To have pagenumbering, we may renew abstract
:
\makeatletter
\if@titlepage
\renewenvironment{abstract}{%
% \titlepage
\null\vfil
\@beginparpenalty\@lowpenalty
\begin{center}%
\bfseries \abstractname
\@endparpenalty\@M
\end{center}}%
{\par\vfil\null %\endtitlepage
}
\else
\renewenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\fi
\makeatother
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}
Best Answer
LaTeX knows three basic page styles
empty is what it says, an empty page. commonly used on titlepages plain is what is used on chapter start pages headings is all other pages.
The pages are internally actually counted throughout the document. So even if a page has pagestyle
empty
, the counter goes up, the page number is just not displayed.You mentioned that you are using the an abstract and I assume you are using an abstract-environment for this. Following the definition of the abstract in
report.cls
one finds that it uses the same as the titlepage and that the page number is hidden and reset after the abstract withAn easy way to get around this is to redefine the environment
This gives you a document where the titlepage has page 1 (also shown on the paper) and the counter isn't reset anymore