I want to create a local table of contents, and am currently using etoc. I noticed that the formatting is largely dependent of the documentclass.
Below is a screenshot for the article document class result of \localtableofcontents.
and the \localtableofcontents
for the report documentclass
My LaTeX needs to be written in the article document class but I would really to make the formatting of the local toc to match the report document class. More specifically the smaller gaps between lines and the …….. before page numbers.
I've scanned through the documentation for etoc and it's filled with complex macros that I'm having difficulty manipulating to get the desired result.
Here's a MWE
\documentclass{report}
\usepackage{etoc}
\title{Report Doc Class}
\begin{document}
\maketitle
\localtableofcontents
\section{first section (of report doc class)}
\section{second section}
\section{third section}
\end{document}
I'm also curious if there's any strong preferences for etoc vs tocloft vs minitoc etc. for local table of contents. Thank you 🙂
Best Answer
Use the
tocloft
package. I have taken your MWE, for which thanks, changed it to thearticle
class and addedtocloft
code to tweak the local ToC to what you say you want.EDIT I have changed the MWE to unbold the ToC entries as asked for in a commment by the OP. I have not changed the graphic to match which shows the original bold entries.