3

How do I remove boldface from appendix chapter headings in the TOC?

I would like the TOC to look like this:

1 First chapter
  1.1 First section
Appendices
Appendix I First appendix
Appendix II Second appendix

My MWE looks like this:

    \documentclass{report}
    \usepackage[toc,page,titletoc]{appendix}

    \begin{document}
    \tableofcontents

    \chapter{First chapter}
    \section{First section}

    \begin{appendices}
    \chapter{First appendix}
    \chapter{Second appendix}
    \end{appendices}
    \end{document}

and returns

1 First chapter
  1.1 First section
Appendices
Appendix I First appendix
Appendix II Second appendix

I've looked through the titlesec and appendix packages but can't see the options, and the solution doesn't appear on Stack Exchange as far as I can tell.

3

An appropriately-placed patch in the ToC can correct this behaviour. Below I've patched \l@chapter - the macro responsible for setting the chapter-related content in the ToC - and removed \bfseries:

enter image description here

\documentclass{report}

\usepackage[toc,page,titletoc]{appendix}

\usepackage{etoolbox}
\makeatletter
\g@addto@macro\appendices{%
  \addtocontents{toc}{\protect\patchcmd{\protect\l@chapter}{\bfseries}{}{}{}}
}
\makeatother

\begin{document}

\tableofcontents

\chapter{First chapter}
\section{First section}

\begin{appendices}
\chapter{First appendix}
\chapter{Second appendix}
\end{appendices}

The process is automated by adding the patch to \begin{appendices}. That way you don't have to clutter your document with such code.

  • This is excellent, exactly what I needed! Thank you. – Tilly Jun 24 '16 at 1:14

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.