1

Here, I removed chapter numbering for some chapters and sections without removing them from ToC using

\chapter*{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgments}

and I've tried to add a mini table of contents using \usepackage{minitoc} and \minitoc.

Here my code Latex :

\documentclass{report}

\usepackage{minitoc}
\usepackage[colorlinks=true,urlcolor=blue
           ,citecolor=blue,linkcolor=blue,bookmarks=true]{hyperref}


\begin{document}
\dominitoc
\tableofcontents
\chapter*{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgments}
\minitoc


\section*{Acknowledgments 1}
\addcontentsline{toc}{section}{Acknowledgments 1}




\chapter{Introduction}
\minitoc
\section{sec1}
\section{sec2}
\end{document}

But : - no mini ToC was created for the first chapter (with removed numbering) - and the mini Toc in the 2nd chapter was these for the 1st one. enter image description here thank you for help

2

Explicit \addcontentsline commands on \minitoc - chapter level confuse minitoc.

Use \addstarredchapter{Acknowledgments} instead, it is a minitoc command.

The \addcontentsline for the section* entry is alright, however, since it goes to the correct ToC.

Please note that \addstarredchapter is only for the ToC entry, the \chapter* macro is still needed.

For other purposes with \doparttoc and \dosecttoc there are \addstarredpart and \addstarredsection macros respectively.

\documentclass{report}

\usepackage{minitoc}
\usepackage[colorlinks=true,urlcolor=blue
           ,citecolor=blue,linkcolor=blue,bookmarks=true]{hyperref}


\begin{document}
\dominitoc
\tableofcontents

\clearpage
\chapter*{Acknowledgments}
\addstarredchapter{Acknowledgments}
\minitoc


\section*{Acknowledgments 1}
\addcontentsline{toc}{section}{Acknowledgments 1}




\chapter{Introduction}
\minitoc
\section{sec1}
\section{sec2}
\end{document}

enter image description here

  • @Math: You're welcome. Happy TeXing. – user31729 Aug 23 '17 at 15:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.