Page LayoutProblem with page numbering

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Jamwa
Posts: 10
Joined: Mon May 07, 2012 2:56 pm

Problem with page numbering

Post by Jamwa »

Look at this code:

Code: Select all

\documentclass[a4paper,10pt]{report}
\usepackage[]{fullpage}
%\usepackage{graphics}

% Title Page
\title{
Prepared by \\John Doe\\
}

\date{May 2012}
\author{John Doe}

\begin{document}
\pagenumbering{roman}
\maketitle
\tableofcontents
\thispagestyle{empty}

\chapter*{Project Overview}
\addcontentsline{toc}{chapter}{Project Overview}
\setcounter{page}{1}
\pagenumbering{arabic}
\paragraph{}
We enumerate two components:

\addcontentsline{toc}{section}{Component A}
\section*{Component A}
\paragraph{}
The general component will work as follows:

\begin{enumerate}
 \item A
 \item B
 \item C
 \item D
 \item E
 \end{enumerate}

\addcontentsline{toc}{section}{Component B}
\section*{Component B}
\paragraph{}
This component will offer a two-way approach

\addcontentsline{toc}{chapter}{Conclusion}
\chapter*{Conclusion}
\paragraph{}
It is my hope that the review has covered to your satisfaction matters relating to the working of the
system. Should you require any further clarification on this review, please do not hesitate to contact us.
\newpage
\begin{center}
John  Doe\\
PO Box 000000 Mombasa\\
0001000 KENYA
\end{center}
\newpage
\begin{center}
\hrule
\vspace{5in}
THIS PAGE HAS BEEN LEFT INTENTIONALLY BLANK
\end{center}
\thispagestyle{empty}

\end{document}
Why is it that the chapter "Conclusion" is recorded on the table of contents to be on page 1 instead of page 2? How do I fix this please?
Last edited by Stefan Kottwitz on Wed May 16, 2012 10:52 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Problem with page numbering

Post by Stefan Kottwitz »

The reason is that you wrote \addcontentsline before the \chapter* command, which makes the page break. Write it afterwards, or break the page before you make the table of contents entry, for example:

Code: Select all

\cleardoublepage
\addcontentsline{toc}{chapter}{Conclusion}
\chapter*{Conclusion}
Stefan
LaTeX.org admin
Jamwa
Posts: 10
Joined: Mon May 07, 2012 2:56 pm

Problem with page numbering

Post by Jamwa »

Aha, thanks for that.
I have interchanged them:

Code: Select all

\chapter*{Conclusion}
\addcontentsline{toc}{chapter}{Conclusion}
and now it is OK
Post Reply