GeneralHow to add an additional line to TOC over page numbers?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
itmi
Posts: 2
Joined: Tue Jun 17, 2008 10:28 pm

How to add an additional line to TOC over page numbers?

Post by itmi »

Hello all,
congratulations, this community forum seems really great. So far forum search helped me to solve most of my latex problems but one...

In the table of contents i would like to add (on every page where TOC appears) a line with word "Page" right over page numbers, so that it would be aligned to the right (don't ask me why do i need it, i don't understand it myself, these are our University rules...). Is there any way to do so? I am using custom .cls file applied to "report" class i think (if it helps it's distributed in the internet as "disser").

I would like it to look approximately like this:

..............Table of Contents
...............................................Page (just without those dots to the left in this line)
1 Some chapter ..........................1
1.1 And section ..........................2
1.1.1 Subsection ........................3

Greetings,
Misha

Recommended reading 2024:

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

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

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

How to add an additional line to TOC over page numbers?

Post by Stefan Kottwitz »

Hi Misha,

you could use \addtocontents:

Code: Select all

\addtocontents{toc}{\protect\hfill Page\par}
Stefan
LaTeX.org admin
itmi
Posts: 2
Joined: Tue Jun 17, 2008 10:28 pm

Re: How to add an additional line to TOC over page numbers?

Post by itmi »

Wonderful, it works great! Million of thanks!
Post Reply