TransWikia.com

How to obtain a minitoc with classicthesis?

TeX - LaTeX Asked on May 13, 2021

Suppose you want to write a report with a local TOC at the beginning of each chapter. This can be obtained with the minitoc package. MWE:

documentclass[a4paper]{report}
usepackage{minitoc}
%input{classicthesis-config}

begin{document}
dominitoc
tableofcontents

chapter{Apple}
minitoc
section{Alabama}
section{Arizona}
subsection{Afghanistan}
subsection{Austria}

chapter{Banana}

chapter{Cherry}

end{document}

The minitoc is visible here:

enter image description here

If one now wants to use the classicthesis template, the minitoc is no longer included in the produced PDF.

MWE: uncomment input{classicthesis-config}.

This seems to be a known issue. I was wondering if there is any update to this. Or is there a workaround to obtain a minitoc?

One Answer

You can replace minitoc with the package etoc with advantages (The first is that it is compatible with classicthesis, the second is that is well maintained).

The only changes are to replace minitoc with localtableofcontents and add the required style (the last separation rule).

I added dummy text to get meaningful tables of contents.

a

c

This is the code.

documentclass[a4paper]{report}

usepackage{classicthesis}

usepackage{etoc} % added <<<<<<<<<<<<

usepackage{kantlipsum} % dummy text <<<<

begin{document}

tableofcontents

etocsettocstyle{vskip0.3baselineskip}{noindentrule{linewidth}{0.5pt}vskip0.5baselineskip} % etoc style for local TOC

chapter{Apple}
localtableofcontents %<<<<<<<<<<<<<<

1. kant[1]
section{Alabama}
2. kant[2-4]
section{Arizona}
3. kant[5-7]
subsection{Afghanistan}
4. kant[8-9]
subsection{Austria}
4. kant[10-12]

chapter{Banana}
localtableofcontents %<<<<<<<<<<<<<<

6. kant[14]
section{Split}
7. kant[15]

chapter{Cherry}
localtableofcontents %<<<<<<<<<<<<<<

7. kant[18]

end{document}

Correct answer by Simon Dispa on May 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP