![目录 – 如何以斜体显示某些章节条目(即前言和附录)](https://linux22.com/image/385682/%E7%9B%AE%E5%BD%95%20%E2%80%93%20%E5%A6%82%E4%BD%95%E4%BB%A5%E6%96%9C%E4%BD%93%E6%98%BE%E7%A4%BA%E6%9F%90%E4%BA%9B%E7%AB%A0%E8%8A%82%E6%9D%A1%E7%9B%AE%EF%BC%88%E5%8D%B3%E5%89%8D%E8%A8%80%E5%92%8C%E9%99%84%E5%BD%95%EF%BC%89.png)
答案1
您必须使用标准\addtocontents
宏将字体更改命令插入到目录中。例如
\documentclass{book} % No idea what your class is
\usepackage{tocloft}
\begin{document}
\frontmatter
\tableofcontents
\addtocontents{toc}{\protect\renewcommand{\cftchapfont}{\protect\itshape}}
\chapter{Preface}
\chapter{Acknowledgements}
\mainmatter
\addtocontents{toc}{\protect\renewcommand{\cftchapfont}{\protect\normalfont}}
\chapter{First}
\chapter{Second}
\backmatter
\addtocontents{toc}{\protect\renewcommand{\cftchapfont}{\protect\itshape}}
\chapter{Notes}
\end{document}