1

My MWE,

\documentclass[oneside,a4paper,12pt]{book}
\usepackage{amsmath,amsthm,amssymb}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{geometry}
\usepackage{minitoc}
\usepackage{lmodern}
\usepackage[english]{babel}

\pagestyle{empty}

\begin{document}



\title{\Huge{\color{Red}{Sample Title}}}
\author{\textsc{\large{The Author}}}
\date{}
\frontmatter
\maketitle
\newpage
\vspace{8cm}
\newpage
\dominitoc
\tableofcontents
\mainmatter

\part{Sample Part}
\chapter{Sample Chapter}
\minitoc

\section{Sample Section}
\section*{Epilogue}
\end{document}

I have the following questions,

  1. In the mini-table-of-contents the unnumbered section(s) (here it is the section named Epilogue) are not shown. How can I solve this problem?

  2. What needs to be done to remove the space between the end of the mini-table-of-contents and the beginning of first section?

0

Here is a solution

  1. We need to use

\section*{Epilogue}
\addtocontents{toc}{\begingroup\protect\renewcommand\protect\contentsline[3]{}}
\addcontentsline{toc}{section}{Epilogue}
\addtocontents{toc}{\endgroup}

Edit if hyperref is used it's \contentsline[4]


  1. There is command \mtcsetfeature{minitoc}{after}{\vspace{DIMEN}}

Complete code

\documentclass[oneside,a4paper,12pt]{book}
\usepackage{amsmath,amsthm,amssymb}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{geometry}
\usepackage{minitoc}
\mtcsetfeature{minitoc}{after}{\vspace{-1cm}}
\usepackage{lmodern}
\usepackage[english]{babel}

\pagestyle{empty}

\begin{document}

\title{\Huge{\color{Red}{Sample Title}}}
\author{\textsc{\large{The Author}}}
\date{}
\frontmatter
\maketitle
\newpage
\vspace{8cm}
\newpage
\dominitoc
\tableofcontents
\mainmatter
\part{Sample Part}
\chapter{Sample Chapter}
\minitoc

\section{Sample Section}
\section*{Epilogue}
\addtocontents{toc}{\begingroup\protect\renewcommand\protect\contentsline[3]{}}
\addcontentsline{toc}{section}{Epilogue}
\addtocontents{toc}{\endgroup}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy