
我正在嘗試在我的報告中插入摘要和致謝頁。我想抑制(前面的數字):
- 抽象的
- 致謝
部分透過使用\section*
.但這樣做後,它也會從目錄中刪除。有沒有辦法在目錄中維護一個條目,同時防止這種情況發生?
答案1
使用
\section*{Section heading}
\addcontentsline{toc}{section}{Section heading}
如果您使用的是report
文檔類,那麼您應該使用
\chapter*{Chapter heading}
\addcontentsline{toc}{chapter}{Chapter heading}
答案2
當您使用自己的部分名稱時,它可能會丟失計數。
這是一種選擇:
\section*{Your section name}
\addcontentsline{toc}{section}{Your section name}\stepcounter{section}
之後只需添加一個計數器即可。