我希望文檔開頭的目錄條目出現在 PDF 索引中,對於使用pdflatex
.
Currently only my \chapter
entries appear there, and adding \chapter
entries for the table of contents is not an option, first of all since it is not an actual chapter and shouldn't be enumerated as such, and also because adding \chapter
entries adds extra empty pages to my文件.
編輯:對於我的參考書目,我設法使用添加它
\usepackage[nottoc,numbib]{tocbibind}
但無法確定目錄中是否有類似的內容
答案1
使用
\addcontentsline{toc}{chapter}{entry text in the index}
就可以了。
答案2
謝謝提姆在此答案的評論中(https://tex.stackexchange.com/a/167069/149079)我最終發現https://tex.stackexchange.com/a/628508/149079有一個很好的解釋。
概括:
同一等級的書籤
\subpdfbookmark{Table of Contents}{name} % Bookmark in PDF for TOC
\tableofcontents{}
書籤位於頂層
\pdfbookmark{Table of Contents}{name} % Bookmark in PDF for TOC
\tableofcontents{}