With the standard TOC, I use this code :

%make the second and other page from TOC without header and footer
\patchcmd{\tableofcontents}% <cmd>
 {\@starttoc}% <search>
 {}{}% <success><failure>

and this code :

%make the first page from TOC without header and footer

And it's working perfectly. But now, I'm trying to write a document with big Appendix. So I write the document in separated files and use the command \include at the end of my master document.

I need to write a separately TOC for my big Appendix, so I'm trying to use the package titletoc. Actually, both the TOCs are correctly generated with this code :

\printcontents{ }{0}{}

And the same code in the included appendix.

My problem is simple: how to remove header and footer in TOC generated by the titletoc package? Obviously, I tried this for the first page :

\printcontents{ }{0}{}{\thispagestyle{empty}}

And I have no idea how to patch the command \printcontents like the command \tableofcontents.

  • You dont need to patch, call \pagestyle{empty} before \tableofcontents, and after, \pagestyle{plain/fancy/whatever} to change it back. \thispagestyle{...} only works for a single page, it automatically reverts to the existing style thereafter. – Nicholas Hamilton Jun 13 '13 at 18:59
  • I have already tried this method, Marco. But i'm not satisfied from the result. If i do : \pagestyle{empty} \startcontents \printcontents{ }{0}{}{} \pagestyle{plain} The second page from my TOC have the plain footer. If i had a \clearpage after the \printcontents, the second page from my TOC have the empty footer but now i have an empty page with my plain footer before the first chapter... – Karim Jun 14 '13 at 6:38

The command \thispagestyle{empty} works also with titletoc. The example below creates two tocs whereby both has no header/footer:


\printcontents{ }{0}{}

\printcontents{ }{0}{}

Your Answer

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

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