Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How do I solve this problem?

When my table of contents takes more than one page, the second page is labeled as page 1. Then my chapter 1 starts on page 2 instead of page 1. Below I give the skeleton of my .tex file.

\documentclass[11pt,a4paper,twoside,openany]{book}

\begin{document}
\frontmatter
\pagenumbering{roman}
\begin{titlepage}
   ...
\end{titlepage}
\chapter{Abstract}
 ...
\chapter{Preface}
 ...
\mainmatter
\pdfbookmark{Contents}{table}
\tableofcontents
\pagenumbering{arabic}

\chapter{Introduction}
 ....
\chapter{Two}
 ...
\backmatter
\chapter{Appendix}
  \label{chapter:appendix}
    \ldots
\end{document}

Any help?

share|improve this question
1  
Welcome to TeX.sx! –  Kurt Oct 13 '12 at 23:16
1  
The table of contents appears in the main matter, thus the behavior is correct. The first chapter starts on the page after the table of contents. You have to run LaTeX 3 times to get the correct value for the pages in the table of contents. –  Guido Oct 13 '12 at 23:23
add comment

1 Answer

up vote 6 down vote accepted

Just remove \pagenumbering{arabic} at the end of the table of contents. \tableofcontents is set right after \mainmatter. That already restarts the page counter with arabic numbers:

\mainmatter
\pdfbookmark{\contentsname}{table}
\tableofcontents
\chapter{Introduction}

Or if you want to put \tableofcontents in the front matter part:

\frontmatter
...
\chapter{Preface}
...
\cleardoublepage % get \pdfbookmark at the start of the table of contents
\pdfbookmark{\contentsname}{table}
\tableofcontents

\mainmatter
\chapter{Introduction}

BTW, also \pagenumbering{roman} can be removed, because this is already called by \frontmatter.

share|improve this answer
    
Thanks. This finally saves my hair, I couldn't stop scratching my head. –  r m Oct 13 '12 at 23:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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