在目錄中新增條目“目錄”

在目錄中新增條目“目錄”

我可能有與這個封閉問題相同的問題:在目錄中新增目錄

我希望“目錄”行出現在我的目錄中,並帶有頁碼等。

我嘗試將命令放在\addcontentsline{toc}{chapter}{Table of contents}下面,\tableofcontents但沒有結果。

這是我的 MWE

\documentclass{report}

\begin{document}

\tableofcontents
\addcontentsline{toc}{chapter}{Table of contents}

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

\end{document}

答案1

\documentclass{report}
\usepackage{tocbasic}
\setuptoc{toc}{totoc}
\begin{document}

\listoftoc[Something like the Table of \contentsname]{toc}

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

\end{document}

您可以將“ Something like the Table of \contentsname”替換為目錄標題。更改標題後,您至少需要執行兩次 LaTeX。

相關內容