I work with latex and I made a new definition of minitoc, that I insert thanks to the redefinition of makechapterhead command :
Code: Select all
\renewcommand{\@makechapterhead}[1]{%
\begin{cadrechap}
\dbg@boite{%
\begin{minipage}[b]{.75\linewidth} % Minitoc
\minisommaire
\end{minipage}}%
\dbg@boite{%
\begin{minipage}[t]{.25\linewidth} % Numéro
\begin{flushright}
{\chapterNumber\thechapter}
\end{flushright}
\end{minipage}}%
\begin{flushright}\vspace{1cm}\chaptitfont#1\end{flushright} % Nom chapter
\end{cadrechap}
}
My problem is that when I have no section in my chapter (for instance for a simple introduction), the minitoc appears with a empty box (as there are no sections).
I would want to have a condition on displaying minitoc, something like :
Code: Select all
\ifnum \c@section > 0
\dbg@boite{%
\begin{minipage}[b]{.75\linewidth} % Minitoc
\minisommaire
\end{minipage}}%
\fi
Thanks to help me.