# classic thesis: consecutive numbering of all pages from the title page to the very last page

The classic thesis has two types of numbering in one document: the first numbering system is from the title page (i.e., page 1) to the list of tables; the second numbering system starts from the first page of Chapter 1 where page number starts from 1 again. But the thesis presentation regulation in our university requires "Every page of the thesis must be numbered consecutively from beginning to end, beginning with the title page and including pages of diagrams, photographs, and the appendices."

I tried to search the answer for making consecutive page numbering for all pages, but could not find it.

Does anyone knows how to solve the problem?

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – cfr Nov 5 '14 at 0:29

Most likely it is \pagenumbering that is causing this resetting of the page counter. The easiest is to redefine it to do nothing but change the display rather than also resetting the page counter. As such, add

\makeatletter
\renewcommand{\pagenumbering}[1]{\gdef\thepage{\csname @#1\endcsname\c@page}}
\makeatother


Without a MWE I am guessing, but it appears that the issue is with the initial parts being \frontmatter and the rest \mainmatter.

At the start of the thesis, insert the command \pagenumbering{arabic}.

You will have to manually reset the page numbering when starting the mainmatter, as it will restart from 1.

You'll need to determine the final number of the front matter and set the following page number using \setcounter{page}{3}, where the number 3 is replaced with what's appropriate for you. Placement of the resetting of the numbering should be at the start of the main matter, but without a MWE I can't specify where that should be for you.

If you started with the original template, then there's the command \pagenumbering{roman} in what's originally called ClassicThesis.tex, and \pagenumbering{arabic} afterwards. Just change the option in the first occurrence of \pagenumbering to arabic, and delete the second occurrence.

• arabic should be global default, so removing both should do the trick (if no frontmatter/mainmatter action is going on). – Johannes_B Feb 4 '15 at 22:26

Also guessing without a MWE, but here are the general rules about page numbering and how to alter them the way you want.

Traditionally, books are typeset with frontmatter, mainmatter, and backmatter. Frontmatter is traditionally typeset with folios (page numbers) in romanettes (lowercase Roman numerals); mainmatter and backmatter are numbered consecutively, starting at 1, in Indo-arabic numerals. LaTeX does this with the \frontmatter, \mainmatter, and \backmatter commands. \frontmatter does other things besides numbering in romanettes; it also suppresses chapter numbers, for example. \mainmatter turns on chapter numbering, and also resets the page number to zero.

LaTeX does not do this, however, unless you tell it to by saying \frontmatter and \mainmatter at the appropriate points. For example, the following:

\documentclass[openany]{book}
\title{Test}
\author{Somebody}
\begin{document}
\frontmatter
\maketitle
\tableofcontents
\chapter{Introduction}
\chapter{Preface}
\mainmatter
\chapter{Real Chapter One}
\chapter{Real Chapter Two}
\end{document}


If you delete the \frontmatter and \mainmatter pages, however, you'll get the following:

As you can see, you can get consecutive page numbering, start to finish, in Indo-arabic numerals simply by not issuing \frontmatter and \mainmatter.

On the other hand, \frontmatter does other things besides change the page numbering, and maybe you want those things. So you need to manually instruct LaTeX not to change you page numbers into romanettes, and not to reset the page number when \mainmatter is issued.

So after you issue \frontmatter, cancel that command's conversion of page numbers to romanettes by saying \renewcommand{\thepage}{\arabic{page}}; that will give you your Indo-arabic page numbers, starting at 1, from the point you issue \frontmatter.

Then, create a new counter to save the page number in later, by saying \newcounter{savepage}.

Finally, before you issue \mainmatter, save the current page number to your new counter by saying \setcounter{savepage}{\value{page}}. Then, after you issue \mainmatter (which resets the page number to 1, remember), tell LaTeX that the page number is really whatever it was before \mainmatter was issued, with \setcounter{page}{\value{savepage}}. Finally, because you're actually one page further on than that, add one to the page number with \stepcounter{page}. So you'll wind up with something like this:

\documentclass[openany]{book}
\title{Test}
\author{Somebody}
\begin{document}
\frontmatter
\renewcommand{\thepage}{\arabic{page}}
\newcounter{savepage}
\maketitle
\tableofcontents
\chapter{Introduction}
\chapter{Preface}
\setcounter{savepage}{\value{page}}
\mainmatter
\setcounter{page}{\value{savepage}}
\stepcounter{page}
\chapter{Real Chapter One}
\chapter{Real Chapter Two}
\end{document}


which produces something like this:

You've got your consecutive page numbering while retaining the other aspects of traditional frontmatter/mainmatter distinctions. Hope that helps.