I'm finalizing my dissertation, and they require that the "Table of Contents - Continued" heading in the ToC (that shows if it flows onto a second page) be centered.

I thought I could find the code that generates the ToC and just customize it a bit, but I can't even find what's generating it...

Anybody have any ideas how I could work this out, or where the code is?

  • Maybe the fancyhdr package would help? – mbork Jul 23 '11 at 18:37
  • 1
    Welcome to TeX.sx! Your question was migrated here from another stackexchange site. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. – Martin Scharrer Jul 23 '11 at 19:38

If you would like to have this "continued" heading in the body text, as heading above the continued table of contents, you can use the afterpage package. Here's an example:

  Table of Contents - Continued\par\bigskip}}}
\chapter{Twenty one}

continued heading

Here I defined a macro \contheading which prints our text on the following page. That command will be written to the .toc file, where \tableofcontents can read it. To protect this command, so that it's written to the .toc file without being expanded, I used \DeclareRobustCommand.

If there are more pages of the table of contents, you can repeat adding \contheading at the appropriate places. This can be error prone sdince you could forget a page if there are lots of them and an approach using header entries might be more suitable.

If you don't want the heading in the body text, but in the page header, use features of your class or your headings package, such as fancyhdr or scrlayer-scrpage. Then, for example, \markboth is useful to override the existing header entry:

\newcommand*{\contheading}{Table of Contents - Continued}% in the preamble
% later at the beginning of the text:

Here I used \protect to prevent the expansion of \markboth when it's written to the .toc file.

Here's a complete example:

% Some general header style settings:
% The text of our heading:
\newcommand*{\contheading}{Table of Contents - Continued}
% Now we write the command to the TOC:
\chapter{Twenty one}
| improve this answer | |
  • 2
    Thanx for this answer, it helped me to modify the toc title, but I couldn't managed to add the "Continued" if TOC spans over 3 pages. It shows up on the second page but not on the third. Could you help me with this? – Nasuf SONMEZ Sep 5 '12 at 13:16

Sorry to answer with such a delay; have you completed the thesis since ?



% to activate some page headers:
% but we need to customize the appearance of the page headers
% Make them centered.
 \def\@oddhead  {\hfil {\bfseries \rightmark }\hfil }
 \def\@evenhead {\hfil {\bfseries \leftmark }\hfil  }

% the default \tableofcontents of class report
% does a \chapter* which puts \contentsname
% in the left and right marks. We must counteract that, 
% hence we use this hook which is executed after this \chapter*
    {\markboth{Table of Contents - Continued}{Table of Contents - Continued}}

% we need to reset the header style to erase our customization
% of \@oddhead and \@evenhead, but this must be done *after*
% the last page of the TOC. Thus either add to the source 
% \pagestyle{headings} (or plain, or whatever) *after*  the first
% \chapter or provoke a \clearpage (which will happen anyhow)
% explictely via this hook and take this opportunity to reset
% the \@oddhead and \@evenhead things.
% Doing this in an \afterpage was tried, but failed.
     {\clearpage\pagestyle{headings}% or plain or whatever    

\title{Test document}





\loopcount 50

  \chapter{This is a chapter}
  \section {first section here}
  \section {second section here}
  \section {third section here}


second page of the TOC

table of contents -- continued

and third page

table of contents -- continued (continued)

etc upto and including its last page.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy