答案1
这是一种更简洁的方法(在我看来)来提供不同的章节编号标题:
暂时操纵tocdepth
计数器或使用\chapter[Other ToC Title]{Different in - body - title}
。
\documentclass{book}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\chapter{A regular chapter}
\blindtext[10]
\addtocontents{toc}{\protect\setcounter{tocdepth}{-5}} % Switch off toc appeareance for a moment
\chapter{In - document chapter name}
\addtocontents{toc}{\protect\setcounter{tocdepth}{3}}
\addcontentsline{toc}{chapter}{Custom chapter name}
\section{Foo}
\blindtext
\chapter[And yet another chapter title in ToC]{And this is the long chapter title that shouldn't appear in ToC!}
\section{Foo bar}
\blindtext[10]
\chapter{Another regular Chapter}
\section{Foo bar bar}
\blindtext
\end{document}
答案2
或许\refstepcounter{chapter}
就像
\refstepcounter{chapter}%
\chapter*{Chapter}
\addcontentsline{toc}{chapter}{Custom chapter name}%
成功了。