Page LayoutError with page numbering - list of figures

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
jlady
Posts: 1
Joined: Fri Jan 07, 2011 10:14 pm

Error with page numbering - list of figures

Post by jlady »

I have the following in my top-level document:

Code: Select all

\documentclass[12pt]{book}
\usepackage[pdftex]{graphicx}
...
\begin{document}
\pagenumbering{roman}
\title{blah blah blah}
\date{December 2010}

\maketitle
\bibliographystyle{plainnat}
\tableofcontents
\listoffigures
\pagenumbering{arabic}
\setcounter{page}{1}
\include{Introduction}
...
The list of figures takes several pages, which start out with roman page numbers, until the last page of the list of figures, which has the arabic numeral 1! Thus, the first page of the introduction has arabic number 3! :cry:

I tried moving the lines

Code: Select all

\pagenumbering{arabic}
\setcounter{page}{1}
to the Introduction.tex file. It fixed that problem, but put page 1 of the Introduction on an even page, so that all the remaining pages had the binding on the outside of the page, instead of the inside where it should be.

Any help would be much appreciated.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Error with page numbering - list of figures

Post by frabjous »

  1. Read about the proper construction of minimal working examples here. This kind of half-filled-in snippet with calls to included files we cannot access just makes for more work for those trying to help you.
  2. I don't understand how the first page of the introduction could be on an even page. You aren't using the "openany" option, so chapters should always start on odd pages. Is the introduction not a chapter?
  3. The \title and \date commands should be the in the preamble, not after \begin{document}.
  4. Why not use the \frontmatter and \mainmatter commands instead of what you're doing with the \pagenumbering commands?
  5. The \pagenumbering command itself resets the page number, so there is no need to do it manually.
  6. You don't need the pdftex option for graphicx if you're compiling with pdflatex; it's better to let that be auto-detected.
So if you want my advice, your document should look like this:

Code: Select all

\documentclass[12pt]{book}
\usepackage{graphicx}
\usepackage{natbib}
% other packages here
\bibliographystyle{plainnat}
\title{blah blah blah}
\date{December 2010}

\begin{document}
\frontmatter
\maketitle
\tableofcontents
\listoffigures
\mainmatter
\include{Introduction}

\end{document}
The \frontmatter and \mainmatter commands will handle the page numbering for you, first roman then switching to arabic. There is no need for using \pagenumbering or \setcounter anywhere.

In general, however, if you did want to make use of those commands, you would want to use \cleardoublepage or just \clearpage before them (depending on circumstances).
Post Reply