# Aplying pagestyle to ToC of a part [on hold]

Creating ToC of parts using \parttoc, I'd like to be able to define pagestyle of ToC generated. In the next code, I have been able to define a pagestyle to every page I wanted, except to ToCs of parts. This is the code:

 \documentclass{report}
\usepackage{fancyhdr}
\usepackage{minitoc}

%Define general pagestyle
\fancyfoot[L]{Left footer}\fancyfoot[C]{Centre footer}\fancyfoot[R]{Right footer}
\pagestyle{fancy}

%Define general ToC pagestyle
\fancypagestyle{toc}{
}

%Modifying part page pagestyle
\makeatletter
\renewcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{toc}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil
\secdef\@part\@spart}
\makeatother

\begin{document}
\doparttoc
\tableofcontents
\thispagestyle{toc}
\part{part 1}
\parttoc
\section{section 1}
\section{section 2}
\part{part 2}
\parttoc
\section{section 3}
\section{section 4}

\end{document}


Could someone help me to define pagestyle of ToCs generated by \parttocas the other pages?

Thank you.

## put on hold as off-topic by Mensch, Stefan Pinnow, siracusa, Sebastiano, RaajaJul 16 at 16:43

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• \renewcommand*\thispageparttocstyle{\pagestyle{toc}} changes the pagestyle of the first parttoc page to toc. BTW: Note that \tableofcontents\thispagestyle{toc} sets the pagestyle of the last TOC page to style toc. – esdd Jan 28 at 12:02
• That works me, thanks! I add a \begingroup \endgroup to not affect the rest. – Daniel Jan 28 at 17:16
• I'm voting to close this question as off-topic because it was solved in comments – Mensch Jul 16 at 15:15