
對於我的報告,我需要一個單獨的附錄目錄。聯絡服務台後,他們向我提供了這段程式碼,它確實有效:);
\usepackage[titles]{tocloft}
\newcommand{\listappendixname}{Contents Appendices}
\newlistof{appendix}{loa}{\listappendixname}
\usepackage{xpatch}
\makeatletter
\apptocmd{\appendix}{
\xpatchcmd{\ttl@addcontentsline}
{\addcontentsline{toc}}
{\addcontentsline{loa}}{}{}
}
\makeatother
在文檔正文中:
\appendix
\phantomsection % so that "Appendix" hyperlink in TOC is correct
\addcontentsline{toc}{chapter}{Appendix}
\listofappendix
然而,現在我需要在附錄清單中將我的章節加粗,但我的章節和小節則不需要。有人可以幫我怎麼做嗎?
我嘗試過這個,但這不起作用;
% Manually adjust the formatting for appendix entries in TOC
\renewcommand{\cftchappresnum}{\textbf} % Make chapter numbers bold
\renewcommand{\cftchapfont}{\bfseries} % Make chapter titles bold
謝謝! ' 親切的問候,莉亞