MiniToc package does not work with titlesec from version 4.4

Issue #176 closed
Juan José Escobar created an issue

Hi! MiniToc does not work on versions 4.4, 4.5, and 4.6. Looking the classicthesis.sty, I have been that the problem is related to titlesec, especifically, with the line:

\ifthenelse{\boolean{ct@nochapters}}{\relax}{\titleclass{\chapter}{top}} % thanks to Javier Bezos of titlesec

which was introduced in version 4.4. By commenting that line the miniToc appears, but the font style of the chapters in the TOC is lost.

Comments (6)

  1. Ivo Pletikosić

    Hi Juan. I'm afraid we cannot do much about this without some deep digging into the internals of the minitoc package (the package doesn't seem to be maintained any more, so no help from their side). The package's manual lists the titlesec package as incompatible, to begin with. The only thing our newly introduced piece of code does is treating chapters and other sectioning commands in the same way when it comes to writing their titles to the .toc file, i.e. all titles are written within curly braces. This helps to format our TOC in a much easier way. I'd say this is a no-fix, or at most an enhancement request. Feel free to work on it, I don't think I have time to do it myself.

    (check if loading minitoc before or after classicthesis makes any difference)

  2. Juan José Escobar reporter

    Thanks for your quick answer. I will continue researching on my own, although effectively minitoc and titlesec are not compatible. Perhaps the best option is to use titletoc to create the partial table of contents since it seems that it can be used together with titlesec. Thanks and sorry for the inconvenience, you do a great job!!

  3. Ivo Pletikosić

    S. Dispa's answer at tex.stackexchange recommends using the package etoc :

    \usepackage{classicthesis}
    \usepackage{etoc} 
    
    \etocsettocstyle{\vskip0.3\baselineskip}{\noindent\rule{\linewidth}{0.5pt}\vskip0.5\baselineskip} % etoc style for local TOC
    
    \begin{document}
    
    \tableofcontents
    
    \chapter{A}
    \localtableofcontents
    \chapter{B}
    \localtableofcontents
    \end{document}
    
  4. Log in to comment