Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I can't seem to figure minitoc well enough to do this.

I have report style, and I want the main tableofcontents to show chapter and sections only. Then inside each section, I want a minitoc of contents that lists everything inside that section only, i.e. subsection, subsubsection, etc...

The same for each section. So, I'd like something like this as the top (i.e. main) table of contents

1.  chapter one
1.1 section one
1.2 section two

The when I go to section one there will be small toc

section one
1.  subsection one
1.1 subsubsection one
1.2 subsubsection tow
2.  subsection two
2.1 subsubsection one

Whatever the numbering is, that is no problem with me. The goal is this: I want the main toc to display just chapters and sections, and the rest show in each section.

I tried this:

\documentclass[]{report}%
\usepackage{minitoc}
\setcounter{tocdepth}{1}
\begin{document}
\tableofcontents 
\chapter{chapter one}
\section{section one}
\minitoc
  \subsection{subsection one}
    stuff
  \subsection{subsection two}  
    stuff
\section{two}
\minitoc
  \subsection{subsection one}
    stuff
  \subsection{subsection two}  
\end{document}

But this shows the same toc in each sections as well as at the top. I tried also

\documentclass[]{report}%
\usepackage{minitoc}
\setcounter{tocdepth}{1}
\begin{document}
\dominitoc
\tableofcontents 
\chapter{chapter one}
\section{section one}
\minitoc
  \subsection{subsection one}
    stuff
  \subsection{subsection two}  
    stuff
\section{two}
\minitoc
\mtcskip
  \subsection{subsection one}
    stuff
  \subsection{subsection two}  
\end{document}

same thing. ALso tried

\documentclass[]{report}%
\usepackage{minitoc}
\setcounter{tocdepth}{1}
\begin{document}
\doparttoc
\tableofcontents 
\chapter{chapter one}
\section{section one}
\doparttoc
  \subsection{subsection one}
    stuff
  \subsection{subsection two}  
    stuff
\section{two}
\doparttoc
  \subsection{subsection one}
    stuff
  \subsection{subsection two}  
\end{document}

But now no toc shows up at all in each section. I am trying to follow the minitoc.pdf and table 1.3 there seems to be what I need to do, but I am missing something.

enter image description here

Any help on how to do this. Thanks.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Since you want ToCs in sections, you would have to use \dosecttoc, and \secttoc, instead of \doparttoc and \parttoc.

However, the minitoc documentation says that section ToCs are not available for the report and book classes. minitoc will only give ToCs for the highest sectioning commands in the hierarchy of the class. So I guess, no luck here with this package.

share|improve this answer
    
I am little confused. You say ToCs are not available for the report and book classes What tocs are these? The screen shot I have above shows the book class. Lets start with this from the square one: Can you give any example, with any class you choose, where I can have a mini table-of-contents inside a section, where the main (top) table of contents does not display what is inside this mini table of contents? Any working example will do. The above pdf file is so complicated. It could have been replaced by few simple example one can understand. –  Nasser Jan 17 '13 at 15:03
    
@Nasser I said "section ToCs are not available for the report and book classes". For those two classes, and similar class that have chapters, you can have minitocs for chapters. On the other hand, for the article class that has section as it highest structure, but no chapter, you can have minitocs in sections. –  mafp Jan 17 '13 at 15:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.