1

In a report file, I have 5 chapters, the minitoc disappeared in just the first 3 of them after adding the list of axamples and the one for algorithms

\documentclass[12pt,a4paper,oneside]{report}
%packages for algorithm
\usepackage{algorithm}
\usepackage{algpseudocode}
%packages for example environment
\usepackage[most]{tcolorbox}
\usepackage{xparse}
\newcounter{example}
\NewDocumentEnvironment{example}{ O{} } {
      \colorlet{colexam}{gray}
      \newtcolorbox[use counter=example,list inside=qex]{examplebox}{%
      % Example Frame Start
      % Empty previously set parameters
      empty,
      % use \thetcbcounter to access the example counter text
      title={Exemple \thetcbcounter : #1},
      % Attaching a box requires an overlay
      attach boxed title to top left,
      % (boxed title style requires an overlay)
      boxed title style={empty,size=minimal,toprule=0pt,top=4pt,overlay={}},
      coltitle=colexam,fonttitle=\bfseries, before=\par\medskip\noindent,parbox=false,boxsep=0pt,left=0pt,right=3mm,top=2pt,breakable,pad at break=0mm,
before upper=\csname @totalleftmargin\endcsname0pt, % Use instead of parbox=true. This ensures parskip is inherited by box.
% Handles box when it exists on one page only
overlay unbroken={\draw[colexam,line width=.5pt] ([xshift=-10pt]title.north west) -- ([xshift=-10pt]frame.south west); },
% Handles multipage box: first page
overlay first={\draw[colexam,line width=.5pt] ([xshift=-10pt]title.north west) -- ([xshift=-10pt]frame.south west); },
% Handles multipage box: middle page
overlay middle={\draw[colexam,line width=.5pt] ([xshift=-10pt]frame.north west) -- ([xshift=-10pt]frame.south west); },
% Handles multipage box: last page
overlay last={\draw[colexam,line width=.5pt] ([xshift=-10pt]frame.north west) -- ([xshift=-10pt]frame.south west); },%
}
\begin{examplebox}}
{\end{examplebox}\endlist}

\usepackage{minitoc} \mtcselectlanguage{french} \dominitoc \dominilot \dominilof

\begin{document} \tableofcontents

\listoffigures \addcontentsline{toc}{chapter}{Table des Figures}\mtcaddchapter

\listoftables \addcontentsline{toc}{chapter}{Liste des Tableaux}\mtcaddchapter

%examples environment list \newpage \tcblistof[\chapter*]{qex}{Liste des Exemples} \addcontentsline{toc}{chapter}{Liste des Exemples}

%algorithms list \listofalgorithms \addcontentsline{toc}{chapter}{Liste des Algorithmes}

\chapter{Les Courbes Elliptiques} \minitoc\newpage \section{section1} \section{section2}

\end{document}

I do not have any error message but some warnings enter image description here

thanks for help.

Hind Dev
  • 641
  • I can reproduce the problem. I don't really know what happens though, seems to be related to \addcontentsline. At least, I can reproduce it with the code shown in https://gist.github.com/TorbjornT/0d4de1f6a88b3c06bc9d2094e2edfa63 Someone will likely be able to answer, even if I'm not. – Torbjørn T. May 12 '18 at 17:43

1 Answers1

1

Solution found by replacing the instruction \addcontentsline with \mtcaddchapter for all the lists

\tcblistof[\chapter*]{qex}{Liste des Exemples} \mtcaddchapter[Liste des Exemples]
\listofalgorithms \mtcaddchapter[Liste des Algorithmes]
Hind Dev
  • 641