![如何避免在 Legrand Orange Book 中打印 \part 页面?](https://linux22.com/image/459693/%E5%A6%82%E4%BD%95%E9%81%BF%E5%85%8D%E5%9C%A8%20Legrand%20Orange%20Book%20%E4%B8%AD%E6%89%93%E5%8D%B0%20%5Cpart%20%E9%A1%B5%E9%9D%A2%EF%BC%9F.png)
我试图从输出中删除 \part pages,因为它是不必要的功能。
该类有一个自定义命令,用于生成和打印图形和页面,但如果我注释掉其中的部分或整个块,它会在其他地方破坏我的文档。
%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
我也尝试过完全避免使用 \part 命令,而是使用
\addtocounter{part}{1}
\addcontentsline{toc}{part}{Guidance document}{\protect\numberline{\thepart}
但这会破坏目录中零件编号的显示,如下所示:
还有其他方法吗?