Generaltoc and page numbering

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

toc and page numbering

Post by iperten »

Probably I'm making somewhere a really stupid mistake but this is killing me.

I am using these commands:

\pagenumbering{roman}
\tableofcontents\newpage
\addcontentsline{toc}{chapter}{Contents}
\listoffigures\newpage
\addcontentsline{toc}{chapter}{List of Figures}
\listoftables\newpage
\addcontentsline{toc}{chapter}{List of Tables}
\pagenumbering{arabic}

to add list of figures, list of tables and contents in the table of contents itself.

I'm also numbering those pages with lowercase roman letters while the rest of the report has Arabic number.

Now, the problem is that often, in the pdf output, there is no correspondence between the page number shown in the contents and the page where the entry effectively is.

Either, though the previous commands, lists of figures and tables have Arabic pagenumbers.

Does anyone know what it is due to?

thank you.

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

pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

toc and page numbering

Post by pumpkinegan »

Did you try adding the entry to the table of contents before creating a newpage:

Code: Select all

\pagenumbering{roman}
\tableofcontents\addcontentsline{toc}{chapter}{Contents}
\newpage
\listoffigures\addcontentsline{toc}{chapter}{List of Figures}
\newpage
\listoftables\addcontentsline{toc}{chapter}{List of Tables}
\newpage
\pagenumbering{arabic} 
Last edited by pumpkinegan on Wed Jul 18, 2007 2:47 pm, edited 1 time in total.
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Re: toc and page numbering

Post by iperten »

Well, it doesn't work: even at the beginning, the page numbers do not appear.

But thank you for the suggestion.
Post Reply