[Tex/LaTex] How to generate table of contents for each section that includes all its subsections

minitoctable of contents

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.

Best Answer

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.