I am trying to remove the \part pages from my output as it is a needless feature.
The class has a custom command producing and printing the graphics and pages, but if I comment out parts of it or the whole block, it breaks my document in other places.
%Command to create and output the parts pages
\newcommand{\outputpartpage}[2]{
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=center, rectangle, fill=ocre!20, inner sep=0pt, minimum height=\paperheight, minimum width=\paperwidth] at (current page.center) {}; % Background color
\node[anchor=north west, inner sep=0pt, xshift=\Gm@lmargin, yshift=-\Gm@tmargin] at (current page.north west) {\fontsize{220pt}{220pt}\selectfont\sffamily\bfseries\textcolor{ocre!40}{#1}}; % Part number
\node[anchor=north east, inner sep=0pt, xshift=-\Gm@rmargin, yshift=-\Gm@tmargin] at (current page.north east) {\fontsize{30pt}{30pt}\selectfont\sffamily\bfseries\textcolor{white}{\strut #2}}; % Part title
\node[anchor=south east, inner sep=0pt, xshift=-\Gm@rmargin, yshift=\Gm@bmargin] at (current page.south east) { % Mini table of contents
\parbox[t][][t]{8.5cm}{ % Width of box holding the mini ToC
\printcontents[part]{l}{0}{\setcounter{tocdepth}{1}} % Display the mini table of contents showing chapters and sections, change tocdepth to 2 to also show %subsections or 0 to only show chapters
}
};
\end{tikzpicture}
}
\renewcommand{\part}[1]{\addcontentsline{toc}{part}{#1}}
\titleformat
{\part} % Section type being modified
[block] % Shape type, can be: hang, block, display, runin, leftmargin, rightmargin, drop, wrap, frame
{\startcontents[part]\outputpartpage{\thepart}{#1}} % Format of the whole section
{} % Format of the section label
{0em} % Space between the title and label
{} % Code before the label
[] % Code after the label
I have also tried to avoid using the \part command totally and use
\addtocounter{part}{1}
\addcontentsline{toc}{part}{Guidance document}{\protect\numberline{\thepart}
But this breaks the display of part numbers in TOC as seen below:
Is there another way please?