I am using my school's latex cls file. Unfortunately, since this package was last updated, we are now required to add the word 'Page' above the topmost page number on each page of the Table of Contents. This cls file includes the following bit of code, which puts 'Page' at the top of the first page, but not any subsequent pages (see attached)

\newcommand\chapteruaf{
\if@arabic\relax\else\if@chapterone\setcounter{page}{1}\else\relax\fi\fi
\@chapteronefalse
\if@openright\cleardoublepage\else\clearpage\fi
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapteruaf}
\def\@schapteruaf#1{\if@twocolumn
\else
\fi}
{\parindent \z@ \centering
\reset@font
\normalsize \bfseries  #1\par
\vspace{-18.3pt}\hspace{143mm} Page
\nobreak
}}


First page of the TOC:

second page of the TOC:

Any thoughts here? I have played with this a bit, and can't get it to work. Thanks.

-

A table of contents is often less than 3 pages so you can simply insert the command into the toc file. With the package afterpage you do not have to know where the pagebreak will happen:

\documentclass[a5paper]{article}
\usepackage{afterpage}
\begin{document}

\tableofcontents

\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage

\end{document}


For other lists, eg List of Figures, use

\addtocontents{lof}{~\hfill\textbf{Page}\par}
...


and so on.

-
Perfect, worked like a charm! Thanks! –  mrdillon Jan 5 '11 at 17:09
@Herbert I have a table of contents of 3 pages and so your suggestion just helped get the word page on the 2nd page of TOC and not on the 3rd page. Is there any other solution to this problem? –  Shray Sharan Sep 11 at 14:34
@ShraySharan: Add the line \addtocontents{toc}{\protect\afterpage{~... again where the second page break appears in your document –  Herbert Sep 11 at 14:37
@Herbert And what change should i make in the command if I want to add the word Page in the List of figures as well –  Shray Sharan Sep 11 at 14:59
\addtocontents{lof}{... the first argument is the file extension, in this case ListOfFigures. See my edited answer –  Herbert Sep 11 at 15:02

You can use the tocloft package to customize the layout of the table of contents, list of figures, list of tables, etc.

\documentclass{article}
\usepackage{tocloft}
\renewcommand\cfttoctitlefont{\hfill\normalsize\bfseries}
% On the same line
%\renewcommand\cftaftertoctitle{\hfill\llap{\bfseries Page}}
% On the next line
\renewcommand\cftaftertoctitle{\hfill\null\\\null\hfill\textbf{Page}}
\begin{document}
\tableofcontents
\section{asdf}
\section{qwer}
\section{zxcv}
\end{document}


The commented out line should be used if you want the Page to appear on the same line as Table of Contents and the uncommented line should be used if you want it to be on the next line.

You can also add the dot leaders to sections (or chapters, if you're using chapters) with

\renewcommand\cftsecdotsep{\cftdotsep}


or

\renewcommand\cftchapdotsep{\cftdotsep}

-
Hmm, when I \usepackage{tocloft}: ! LaTeX Error: Command \c@lofdepth already defined. Or name \end... illegal, see p.192 of the manual. I am guessing this comes down to something from the cls file... –  mrdillon Jan 5 '11 at 14:36
per this thread: mail-archive.com/lyx-users@lists.lyx.org/msg16706.html, if \usepackage[subfigure]{tocloft} is called, things work fine. Unfortunately, this solution seems to still only place 'Page' on the first page of the TOC, and nothing else. Also for some reason it is killing the pagebreak between the TOC and LOF and is altering the fonts and layout of the front matter significantly. –  mrdillon Jan 5 '11 at 14:52
@mrdillon: Ah, I misunderstood. I thought you only wanted it at the top. Herbert's approach seems like a good approach. tocloft allows a fair bit of customization, so it doesn't surprise me that it changes the layout, but it gives you a uniform way to change the layout. –  TH. Jan 5 '11 at 20:38
@mrdillon: You should be using the subfig package instead of the older subfigure. Then there's no need to use the subfigure option to tocloft. –  TH. Jan 5 '11 at 20:47

Hey, as it turns out we go to the same school, and are dealing with the same uafthesis bugs! I've been fixing mine on github at http://github.com/jesusabdullah/uafthesis.

Fwiw, I read the handbook, and it says we only need "page" above the first page, from what I can tell.

-