我的书中有一个目录memoir
。我希望每章都有一行,此外还有每组类似章节的标题。
由于某种原因,该Contents
页面包含页码为“i”的“目录”行。如何从目录中删除这一行无用的内容?
\documentclass{memoir}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\phantomsection
\addcontentsline{toc}{part}{Topic 1}
\chapter{Chapter 1}
This is the first chapter.
\chapter{Chapter 2}
This is the second chapter.
\phantomsection
\addcontentsline{toc}{part}{Topic 2}
\chapter{Chapter 3}
This is the third chapter.
\chapter{Chapter 4}
This is the fourth chapter.
\end{document}
答案1
替换\tableofcontents
为
\begin{KeepFromToc}
\tableofcontents
\end{KeepFromToc}
答案2
为了防止将标题添加到目录中,请使用带星号的版本
\tableofcontents*