0

I am trying to write a thesis with my University's .cls template. My table of content is 4 pages and I am required to have "Chapter" and "Page" tag at the top of each page of TOC. However, they get printed on the first page alone. I can print the titles on the second TOC page when I type the following line in the main.tex file.

\addtocontents{toc}{\protect\afterpage{\hspace{-3.1cm}Chapter ~\hfill\ Page \par\medskip}}

Is there a way to print "Chapter" and "Page" titles on all the TOC pages? Please let me know and thank you in advance

Please find the TOC code part of the .cls file below

\newcommand\cname{Chapter}
\newcommand\pname{Page}
\newcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \newpage
    {\centering \ssp \rule{0in}{1in} \par
       \contentsname \par \dsp
       \cname \hfill \pname
       \par \dsp}
    \renewcommand{\thepage}{\roman{page} \par
    }
    \@starttoc{toc}
    \newpage
    \setcounter{placeholder}{\value{page}}
    \pagenumbering{arabic}   % resets page counter to 1, arabic format
    }
1
  • If your university supplies a template that does not follow the university's requirements then they should either change the requirements or revise the template to match them. You might be able to change the page headers to something like what they want. Dec 15, 2020 at 18:43

1 Answer 1

0

For anyone looking for a quick fix, I figured out a solution(although it is not elegant). I tried adding this code in three different places across the main file (with some non-empty lines in between them). I repeated this trial and error until all the TOC pages had the desired title.

  \addtocontents{toc}{\protect\afterpage{\hspace{-3.1cm}Chapter ~\hfill\ Page \par\medskip}}
...someline
...someline
\addtocontents{toc}{\protect\afterpage{\hspace{-3.1cm}Chapter ~\hfill\ Page \par\medskip}}
...someline
\addtocontents{toc}{\protect\afterpage{\hspace{-3.1cm}Chapter ~\hfill\ Page \par\medskip}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .