4

I am going crazy over the page numbers in my thesis. I have included the relevant part of my document below.

I have two problems:

  • The dedication is numbered ii. which is good, but the abstract is not numbered, the table of contents resets to i., and the second page of the ToC is numbered 1.
  • Page numbers for roman style and "new chapter" pages appear bottom-center instead of top-right, which is fine with me, but they fall below the allowed margin of 1 inch.
\documentclass[12pt]{report}
\usepackage[centertags]{amsmath}
\usepackage{amsfonts,amssymb,amsthm}
\usepackage{verbatim,enumerate}
\usepackage{mathrsfs}


\setlength{\topmargin}{0 in}
\setlength{\headheight}{0.25 in}
\setlength{\oddsidemargin}{0.5 in}
\setlength{\textwidth}{6 in}
\setlength{\textheight}{8.5 in}
\setlength{\headsep}{0.25 in}
\newcommand{\singlespaced}{\renewcommand{\baselinestretch}{1}\normalfont}
\newcommand{\doublespaced}{\renewcommand{\baselinestretch}{2}\normalfont}

\doublespaced

\begin{document}
\pagenumbering{roman}
\include{titlepage}
\include{dedication}
\include{abstract}
\tableofcontents
\pagenumbering{arabic}
\pagestyle{myheadings} \markright{}
\include{chap1}
\include{chap2}
\include{chap3}

\end{document}
  • Welcome to TeX.sx! Put a \clearpage before every \pagenumbering. \pagenumbering changes the page number of the current page and not the next one. – Marco Daniel Apr 20 '13 at 6:46
4

You get three times a page 1 in the front matter: in the report class the titlepage environment which is used also by abstract resets the page number to 1.

I suggest you to use the book class with its \frontmatter and \mainmatter commands, with \chapter{\abstractname} for the abstract in the front matter.

However also the report class can be used, after patching the relevant commands; I show only the important parts, add the rest to suit. It's probably better to \usepackage[<options>]{geometry} for setting the page parameters and \usepackage{setspace} for the interline spacing.

Remember the \clearpage command before \pagenumbering{arabic}.

\documentclass[12pt]{report}

%%% PATCHES %%%
\usepackage{etoolbox}
\makeatletter
% Patch `titlepage` not to reset the page number
\patchcmd{\titlepage}{\setcounter{page}\@ne}{}{}{}
\patchcmd{\endtitlepage}{\setcounter{page}\@ne}{}{}{}

% Patch `abstract` so that it shows the page number
\patchcmd{\abstract}{\titlepage}{\titlepage\thispagestyle{plain}}{}{}
\makeatother
%%% END PATCHES %%%

\begin{document}
\pagenumbering{roman}
\begin{titlepage}
abc
\end{titlepage}
\begin{abstract}
dddd
\end{abstract}

\tableofcontents

\clearpage %%%%% <---- IMPORTANT
\pagenumbering{arabic}
\pagestyle{myheadings} \markright{}
\chapter{A}

\end{document}
  • Thanks. The counter is working properly now, but how do I make a page number appear on the abstract page? – Nick Apr 20 '13 at 8:42
  • @Nick I've added the code. – egreg Apr 20 '13 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.