0

For making font changes for all chapter, I use the following command from the tocloft package: \renewcommand{\cftchapfont}{\normalfont\hfill}.

However, for this use case, I need the main chapter entries to be in normal font and the front matter and appendix entries to be in italics. An example is the following:

enter image description here

  • Welcome, you haven't given any clue what's going on. The screenshot you uploaded shows a table of contents far from the default look. Are you using a special documentclass? Where can we get it? Can you provide a minimal working example? – Johannes_B Nov 10 '18 at 7:06
0

You have to insert the font changing commands into the ToC by using the standard \addtocontents macro. For example

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.