Having a book document class, I am trying to achieve having different footer/headers for the first page of every chapter.
Based on this answer instructions, I have defined the following custom style, using titlesec:
\newpagestyle{pageHeaderStyle}{%
\setfoot
{}
{\vcenteredhbox{\confidentialClause}}
{\thepage}
}
And then change the chapter first page style by using:
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{pageHeaderStyle}
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
Everything works fine for every chapter except the ToC, which outputs CONTENTS at both header and footer, like below:
While the expected behaviour (that works fine in the rest of chapters) is:



\tableofcontentsuses\chapter*which is apparently not catched with yourtitlesecapproach – Mar 06 '17 at 17:11titlesecand a redefinition of\chapterwill go well together – Mar 06 '17 at 17:18\secdefmacro\def\secdef#1#2{\@ifstar{#2}{\@dblarg{#1}}}causes\chapterto execute\@chapterand\chapter*to execute\@schapter. – John Kormylo Mar 06 '17 at 17:29