Text FormattingToC with Roman and Arabic Page Numbers

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Leoni
Posts: 7
Joined: Sat Feb 12, 2011 1:03 pm

ToC with Roman and Arabic Page Numbers

Post by Leoni »

Hi guys,

I am desperately looking for the solution of my problem:
I am writing a dissertation. My contents will include Abstract, Abbreviations, Symbols and Glossary before the very first Chapter. All these four will not count as chapter, so I used

Code: Select all

\chapter*{Abstract}
I'd like to use roman page numbering for these four sections, so I do

Code: Select all

\include{TitlePage}
\pagenumbering{roman}
\include{Abstract}
\include{Abbreviations}
\include{Symbols}
\include{Glossary}
\tableofcontents
\addcontentsline{toc}{section}{Abstract}
\addcontentsline{toc}{section}{Abbreviations}
\addcontentsline{toc}{section}{Symbols}
\addcontentsline{toc}{section}{Glossary}
\newpage
\pagenumbering{arabic}
\include{Intro1}
... and so on
My problem is, that when the Table of Contents is generated, it somehow doesn't take the page numbers, but it puts xv (the last page before chapter 1 starts) everywhere, so it looks like this:

Code: Select all

Contents
Abstract .................. xv
Abbreviations ............. xv
Symbols ................... xv
Glossary .................. xv
instead of:

Code: Select all

Contents
Abstract................... i
Abbreviations.............. iv
Symbols.................... vi
Glossary................... x
What do I do wrong here?
Any help will be highly appreciated,
Leoni

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

ToC with Roman and Arabic Page Numbers

Post by Stefan Kottwitz »

Hi Leoni!

\addcontentsline produces the entry fo the table of contents using the page number where you positioned the command. Use it in the corresponding document part, such as

Code: Select all

\clearpage
\addcontentsline{toc}{section}{Abstract}
\include{Abstract}
\clearpage
\addcontentsline{toc}{section}{Abbreviations}
\include{Abbreviations}
\clearpage
\addcontentsline{toc}{section}{Symbols}
\include{Symbols}
\clearpage
\addcontentsline{toc}{section}{Glossary}
\include{Glossary}
\tableofcontents
Stefan
LaTeX.org admin
Leoni
Posts: 7
Joined: Sat Feb 12, 2011 1:03 pm

Re: ToC with Roman and Arabic Page Numbers

Post by Leoni »

And that did the job!

Vielen herzlichen Dank, Stefan ;)
Post Reply