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.

Easy example:

\documentclass{scrreprt}

\usepackage{minitoc}

\begin{document}

\doparttoc[n]
\noptcrule
\tableofcontents

\part{foo}
\parttoc

\chapter{bar1}
\chapter{bar2}
\chapter{bar3}
\chapter{bar4}

\end{document}

This creates a nice document, but the toc for the part is on a new page, but it would fit perfectly on the same pag as the part title. Is there a way to have the parttoc on the same page as the part title? So that it behaves like minitoc for chapters.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

You can redefine \partheadendvskip to suppress the default \vfil\newpage; you might also want to redefine \partheadstartvskip to move up vertically the part heading. Finally you need to redefine \beforeparttoc:

\documentclass{scrreprt}

\usepackage{minitoc}

\renewcommand*{\partheadstartvskip}{%
  \null\vskip20pt
}
\renewcommand*{\partheadendvskip}{%
  \vskip2pt
}

\renewcommand\beforeparttoc{}

\begin{document}

\doparttoc[n]
\noptcrule
\tableofcontents

\part{foo}
\parttoc


\chapter{bar1}
\chapter{bar2}
\chapter{bar3}
\chapter{bar4}

\end{document}

enter image description here

share|improve this answer
    
Thanks, works perfectly. :) –  Foo Bar Sep 28 '12 at 17:51

Here follows a minimal working example:

\documentclass[a4paper,11pt,twoside,openright]{memoir}

    \setlrmargins{*}{*}{1}
    \setulmargins{*}{*}{1}
    \checkandfixthelayout[nearest]

    \usepackage{color}
    \usepackage{xcolor}

    \usepackage{titletoc}

    \settocdepth{subsection}
    \setsecnumdepth{subsection}

    \makeatletter
    \def\@endpart{
    %
      \vfil
      \textcolor{red}{\hrule height 1.5 pt}
    \setcounter{tocdepth}{0}

        \startcontents[parts]
        \printcontents[parts]{}{0}{}

    \textcolor{red}{\hrule height 1.5 pt}
      \par\bigskip
      \vfil\newpage
                  \if@twoside
                   \if@openright
                    \null
                    \thispagestyle{empty}%
                    \newpage
                   \fi
                  \fi
                  \if@tempswa
                    \twocolumn
                  \fi}
    \makeatother

\begin{document}

\part{First Part}

\chapter{First Chapter}
\section{First Section}
\subsection{First Subsection}

\chapter{Second Chapter}
\section{Second Section}
\subsection{Second Subsection}

\chapter{Third Chapter}
\section{Third Section}
\subsection{Third Subsection}

\end{document}

And this is how the first page looks like:


enter image description here


If you are interested in tweaking it a little bit more, check out this post: Pretty List of Figures and List of Tables.

Inspired by the work of Gonzalo Medina, I have managed to do a quite nice Part TOC which you can use. Check out the link and reuse some of the code if you find it useful.

By the way, the choice of the colours were made so that I could easily find the code blocks in the preamble, coding for the different elements in the TOC and Part TOC.

Pictures can be seen below:


enter image description here


enter image description here


share|improve this answer
    
This is nearly an answer, but you need to include the necessary code; referencing another question and saying that folks need to change some code means that your answer doesn't stand alone... –  cmhughes Apr 4 at 0:50
    
Okay, I just updated my answer! This should be enough to get started ;-) –  poltexious Apr 4 at 1:27

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.