I'm writing my thesis and for easy reading and structures, I'm using the minitoc
package to display a ToC for each chapter.
When I get to the appendices however, the \minitoc
doesn't work anymore (it displays nothing, but also doesn't give any errors). It works fine before the \begin{appendices}
or \appendix
(i.e. in regular chapters, as displayed below).
As a fix, I've tried using the titletoc
package to recreate the minitoc
's style for appendices. I've gotten quite close but I'm not there yet.
Can you help me finish it? I think I'm still lacking:
- increasing margins left and right
- decreasing vertical line spacing
- optionally, stretching the horizontal lines by about 2 pixels. Since I'm only noticing because I have them side-by-side, nobody will notice when I use only one in the final document.
MWE
\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{float}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{lipsum}
\usepackage{parskip}
\usepackage{titlesec}
\titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\renewcommand{\familydefault}{\sfdefault} %Use sans-serif font.
\usepackage{minitoc}
\renewcommand{\mtctitle}{Inhoudsopgave}
\renewcommand{\mtifont}{\large\sffamily}
\renewcommand{\mtcfont}{\small\sffamily}
\renewcommand{\mtcSfont}{\small\sffamily}
\renewcommand{\mtcSSfont}{\small\sffamily}
\renewcommand{\mtcSSSfont}{\small\sffamily}
% Add MiniToC package.
% Translate 'Contents' to 'Inhoudsopgave'
% Change all fonts from default (serif) to sans serif - to equal the regular document font
\setcounter{minitocdepth}{2} %show subsec's (2) up to this level in minitoc's. Paragraphs ("3*sub"sections) and lower don't show up
\setcounter{secnumdepth}{3} %number subsubsec's (3) up to this level. paragraphs don't get a number.
\setcounter{tocdepth}{1} %show up to level 1 (sections), hide subsections (2) and lower in ToC. (used in combination with minitoc to show ToC's per chapter)
\usepackage{titletoc}
% What styling do I need here?
\begin{document}
\dominitoc
\tableofcontents
\chapter{Introduction}
\minitoc
% My Solution
\startcontents[sections] {\large Inhoudsopgave} \vspace{-15pt}\par
\noindent\hrulefill \vspace{-5pt}
{\small \printcontents[sections]{}{1}{\setcounter{tocdepth}{2}} }
\vspace{-10pt} \noindent\hrulefill
% My Solution
\section{One}
\lipsum[1]
\subsection{One One}
\subsection{One Two}
\section{Two}
\subsection{Two One}
\subsection{Two Two}
\section{Three}
\subsection{Three One}
\subsection{Three Two}
\subsection{Three Three}
% My Solution
\stopcontents[sections]
% My Solution
\end{document}