With the standard TOC, I use this code :
%make the second and other page from TOC without header and footer
\makeatletter
\patchcmd{\tableofcontents}% <cmd>
{\@starttoc}% <search>
{\thispagestyle{empty}\@starttoc}
{}{}% <success><failure>
\makeatother
and this code :
%make the first page from TOC without header and footer
\tableofcontents{\thispagestyle{empty}}
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 :
\startcontents
\printcontents{ }{0}{}
\chapter{blabla}
\chapter{bloblo}
...
\stopcontents
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
.
\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.\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...