General ⇒ Content list
Content list
I am using a "book" document class and "\tableofcontents". At the end the TOC, I have "references". Actually the page number at which this reference section is starting is 98, however, it is printing 97 in the TOC. I am not sure what an issue is. I am getting other page numbers correct in the document and in TOC. Is this a common issue?
Thank you,
Omkar
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Content list
without some code all I can do is to guess (and I do not like guessing). How are you including the References section in the ToC?
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Content list
if you are using \addcontentsline or \addtocontents, try \cleardoublepage (or \clearpage) right before it.
Stefan
Re: Content list
I tried the options of \clearpage and \cleardoublepage, but no change. I am still getting the same problem. Here, is the code that I am using -
\begin{document}
\include{abstract}
\pagestyle{plain}
\pagenumbering{Roman}
\tableofcontents
\clearpage
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
\newpage
\listoffigures
\listoftables
\pagenumbering{arabic}
\input{ch1}
\input{ch2}
\input{ch3}
\end{document}
Thanks for the help.
Omkar
Re: Content list
May I request someone to help me with the issue about page numbering in the TOC that I am facing?
Thank you all in advance.
Regards,
Omkar
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Content list
your example code does not show how you are including your references section in the document and in the toc. So I cannot correct your code. I suggest you consider to try my advice above right at the place where the references section starts, or just show us that code or even a minimal working examples.
Stefan
Re: Content list
Thanks for the efforts. This is the code I tried using your suggestions, "\cleardoublepage" or "\clearpage".
\begin{document}
\include{abstract}
\tableofcontents
\clearpage
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
\newpage
\listoffigures
\listoftables
\input{ch1.tex}
\input{ch2.tex}
\input{references.tex}
\end{document}
Chapters- ch1, ch2 etc. - contain
\chpater{ch1}
blah blah.........
Chapter "referecences.tex" includes
\addcontentsline{toc}{chapter}{References}
\renewcommand{\bibname}{References}
\begin{thebibliography}{99}
\bibitem{} Omkar1........
\bibitem{} Omkar2.......
\end{thebibliography}
I found something interesting after your suggestion. If I do not use "\listoffigures" and "\listoftables", I am getting correct numbering for "References" in TOC. Otherwise, I am getting page number one less than the actual one. Other pagenumbers for chapters, sections, subsections etc. have no issues whatsoever.
Will you help me in fixing this?
Regards,
Omkar