TransWikia.com

Adding Section without Number to Minitoc using mtcaddsection?

TeX - LaTeX Asked by Matt P on July 29, 2020

I’m trying to get the below code to work, but I’m not sure what I’m doing wrong.

section*{ASTERISK SECTION}
mtcaddsection[ASTERISK SECTION]

I can get mtcaddchapter[ASTERISK CHAPTER] to add that to the main TOC how I want without adding a number or affecting the chapter count:

enter image description here

How do I get an entry in the minitoc for an un-numbered entry for the section*{ASTERISK SECTION}?

enter image description here

Here’s my current MWE:

documentclass[11pt,oneside]{book} % [text size]{document type}
usepackage[utf8]{inputenc}
usepackage{graphicx}
usepackage{fancyhdr, blindtext} %for testing
usepackage{minitoc} % Get chapter level TOC
renewcommand{mtctitle}{TABLE OF CONTENTS}

setcounter{parttocdepth}{4} % set minitoc sublevel
setcounter{secnumdepth}{4} % to get X.X.X.X
mtcsetrules{*}{off}
dominitoc
begin{document}
dominitoc
tableofcontents
    chapter{FIRST CHAPTER}label{ch5}
    
    minitoc{protectthispagestyle{fancy}}newpage
    
    section{Minitoc C1 S1}
    blindtext blindtext
    subsection{C1 SS1}
    blindtext blindtext
    subsection{C1 SS2}
    blindtext blindtext
    subsection{C1 SS3}
    blindtext blindtext
    subsubsection{C1 SS3 S1}
    blindtext blindtext
    section{Minitoc Section 2}
    blindtext blindtext
    subsection{My Section  2 Subsection 1}
    blindtext blindtext
    subsection{My Section  2 Subsection 2}
    blindtext blindtext
    subsection{My Section  2 Subsection 3}
    blindtext blindtext
    subsubsection{My Section  2 Subsection 3  Subsubsection 1}
    blindtext blindtext
    section*{ASTERISK SECTION}
%   mtcaddsection[ASTERISK SECTION]
    mtcaddchapter[ASTERISK CHAPTER]
    blindtext blindtext
    chapter{SECOND CHAPTER}
    blindtext blindtext
end{document}

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP