Page LayoutChapter layout

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
emeric
Posts: 4
Joined: Sat May 08, 2010 11:12 am

Chapter layout

Post by emeric »

Hello,

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}
}
So, a minitoc appears at left of chapter names.

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
Which doesn't work... I think that I have to retrieve the number of section of current chapter (maybe with \c@section ?) and compare it to 0 but I don't know how to do that...

Thanks to help me.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply