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

1 Answer 1

up vote 3 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

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.
http://tex.stackexchange.com/questions/94049/how-to-generate-table-of-contents-for-each-section-that-includes-all-its-subsect
tex.stackexchange.com
crawl=CC-MAIN-2015-06
71543
application/http; msgtype=response
sha1:OS3T3ASLY7GPT3DOCMYSPV4YVCPBDL7U
<urn:uuid:ca749df4-7c93-4353-83e2-e5df8361c1fd>
2015-02-01T15:05:27Z
198.252.206.140
sha1:BY6URE4VJ7OSWB7TNLNWQL7PC7PMLPSP
<urn:uuid:2a7f81a6-0e7c-4291-a282-840f19192f21>
http://tex.stackexchange.com/questions/94049/how-to-generate-table-of-contents-for-each-section-that-includes-all-its-subsect
response
<urn:uuid:af373e9c-108b-4159-90b9-a14aebbf1029>
robots: classic
hostname: ip-10-180-212-252.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2015-06
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for January 2015
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf