Similar to How to Add Description to TOC, I want to add short descriptions to sections that show up in the TOC. Unfortunately, \addtocontents
does not seem to work for minitoc, which I want to use. Here is a minimal example:
\documentclass{book}
\usepackage{minitoc}
\begin{document}
\dominitoc
\tableofcontents
\chapter{First Chapter}
\minitoc
\section{First Section}
\addtocontents{toc}{\noindent short description of the first section}
\addcontentsline{toc}{section}{this would work but it adds the page number and dots (which is unwanted)}
\section{Second Section}
\addtocontents{toc}{\noindent short description of the second section}
\end{document}
It creates the correct output for \tableofcontents
but the short descriptions are missing for \minitoc
:
Using \addcontentsline
instead of \addtocontents
works (see example) but the formatting with the dots and the page number is unwanted. Is there a way to get short descriptions for the sections/subsections into the TOC produced by minitoc
?