Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Currently, this code generates pages that look something like:

  First thing.................i
  Second thing...............ii
1 First Big Chapter...........1

and so forth, which is fine except that I need the word "page" above the right-hand column:

                           Page
  First thing.................i
  Second thing...............ii
1 First Big Chapter...........1

I need this "Page" heading on the Table of Contents, List of Figures and List of Tables.

UPDATE:

After my previous attempts at adding \hfill Page into the \tableofcontents macro in uafthesis.cls, I tried a new approach based on this posting. It's pretty close, but there's one problem: The bibliography now has a "Page" header too! I've tried using the TeX \newif and friends to make it go away, but no dice.

share|improve this question
    
I don't understand the problem, because there is none. »Page« is also inserted automatically into LoF and LoT by the class. So there is no need for supplements. –  Thorsten Donig Apr 23 '11 at 9:09
    
This is because I just added it. I've been hammering at this problem all day. Right now I'm at the point where I can get "Page" inserted into everything I want...but NOW it also inserts in the bibliography! /o\ I tried making that go away with some TeX \if action, but no dice. :( –  Joshua Holbrook Apr 23 '11 at 9:47

2 Answers 2

I think my thesis requirements are worse, and I satisfied them all with memoir pagestyles and hooks. It's also entirely possible there are more elegant ways of getting this done. Suggestions welcome.


Page 1 of ToC: page number at bottom-center, like plain, with "Page" right justified above page number column:

enter image description here

\copypagestyle{toc-initial}{plain}
\renewcommand{\aftertoctitle}{%
  \par\nobreak\vspace{\onelineskip}\vspace{\onelineskip}
  \mbox{}\hfill{\normalfont Page}
  \par\nobreak
  \addtocontents{toc}{\protect\pagestyle{toc}%
    \protect\thispagestyle{toc-initial}}%
}

Pages 2-M of ToC, where M is defined as the last page with chapter entries: page number at top-right, with "Page" right-justified above page number column, and "Chapter" left-justified above the chapter entries:

enter image description here

\makepagestyle{toc}
\makeoddhead{toc}{\chaptername}{}{%
  \enlargethispage{-3\onelineskip}\normalfont\thepage\par%
  \vspace{\onelineskip}Page}
\makeevenhead{toc}{\chaptername}{}{%
  \enlargethispage{-3\onelineskip}\normalfont\thepage\par%
  \vspace{\onelineskip}Page}
\makeoddfoot{toc}{}{}{}
\makeevenfoot{toc}{}{}{}

Pages M+1-N of ToC (i.e., pages with nothing but Appendix entries): page number at top-right, with "Page" right-justified above page number column, and "Appendix" left-justified above the appendix entries:

enter image description here

\makepagestyle{toc-app}
\makeoddhead{toc-app}{\appendixname}{}{%
  \normalfont\thepage\par%
  \vspace{\onelineskip}Page}
\makeevenhead{toc-app}{\appendixname}{}{%
  \normalfont\thepage\par%
  \vspace{\onelineskip}Page}
\makeoddfoot{toc-app}{}{}{}
\makeevenfoot{toc-app}{}{}{}

Page 1 of LoF, LoT, etc: page number at bottom-center, like plain, with "Page" right justified above page number column:

enter image description here

\copypagestyle{lot-initial}{plain}
\renewcommand{\lotheadstart}{\newpage \chapterheadstart}
\renewcommand{\afterlottitle}{%
  \let\numberline\oldnumberline
  \par\nobreak\vspace{\onelineskip}\vspace{\onelineskip}
  {\normalfont Table}\hfill{\normalfont Page}
  \par\nobreak\vspace{\onelineskip}
  \addtocontents{lot}{\protect\pagestyle{lot}\protect\thispagestyle{lot-initial}}
}

Pages 2-K of LoF, LoT, etc: page number at top-right, with "Page" right-justified above page number column, and "Table," "Figure," etc. left-justified above the appendix entries:

enter image description here

\makepagestyle{lot}
\makeoddhead{lot}{\tablename}{}{%
  \enlargethispage{-3\onelineskip}\normalfont\thepage\par\vspace{\onelineskip}Page}
\makeevenhead{lot}{\tablename}{}{%
  \enlargethispage{-3\onelineskip}\normalfont\thepage\par\vspace{\onelineskip}Page}
\makeoddfoot{lot}{}{}{}
\makeevenfoot{lot}{}{}{}

There's a bit more on my development version (automagic \checktocheaders, \fixtocheaders, and a few other things to hide the pagestyle commands from my users), but the above is the core of it.

share|improve this answer

I assume that you added the lines 396-399 to the source of the class file. Delete them and try the approach shown below.

\documentclass[11pt,english]{uafthesis}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{blindtext}

\AtBeginDocument{%
  \addtocontents{toc}{~\hfill Page\par}
  \addtocontents{lof}{~\hfill Page\par}
  \addtocontents{lot}{~\hfill Page\par}
}

\begin{document}
  \tableofcontents
  \listoffigures
  \listoftables

  \blinddocument\cite{key}

  \begin{figure}[!ht]
    \centering
    \rule{6.4cm}{3.6cm}
    \caption{Dummy figure}\label{fig:dummy}
  \end{figure}

  \begin{table}[!ht]
    \caption{Dummy figure}\label{tab:dummy}
    \centering
    \rule{6.4cm}{3.6cm}
  \end{table}

  \begin{thebibliography}{9}
    \bibitem{key} Bibliography Item
  \end{thebibliography}
\end{document}

In case these lists spread over multiple pages, you will have to add the term »Page« anew as shown in Herbert's answer to the mentioned question.

By the way, it is no good practise to edit a class file. You better redefine the critical parts in the preamble. Note that the blindtext package is only for creating the dummy document thus not part of the solution.

share|improve this answer
    
"By the way, it is no good practise to edit a class file." Normally I would agree, but this is supposed to be the official class file for theses at my university. I'd rather the class file work as expected than have to throw a bunch of stuff into the preamble. –  Joshua Holbrook Apr 23 '11 at 23:01
    
@Joshua: Must have missed that. Then you should put \AtBeginDocument into the class file. You may replace it with \AtEndOfClass (but seems not necessary). For details have a look at Section 4.6 in the document »LaTeX2e for Class and Package Writers« (also know as class guide). –  Thorsten Donig Apr 24 '11 at 9:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.