1

I have this problem: as you can see

No Prefazione alla Prima Parte

I'd like to delete "\section*{Prefazione alla Prima Parte}" from chapter 1's minitoc. How could I do? Does a MWE serve? Thank you and Best Regards

\documentclass{book}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[a4paper,top=3cm,bottom=3cm,left=1.5cm,right=1.5cm]{geometry}
\usepackage{xcolor}
\usepackage{imakeidx}
\usepackage[tight, italian]{minitoc}
\usepackage{hyperref}


\setcounter{chapter}{-1}

\setcounter{section}{-1}

\newcommand*{\arabicdec}[1]{\the\numexpr\value{#1}-1\relax}
%\renewcommand*{\thechapter}{\arabicdec{chapter}}
\renewcommand*{\thesection}{\thechapter.\arabicdec{section}}

\setcounter{secnumdepth}{3}

\setcounter{tocdepth}{4}


\begin{document}

\title{\color{red}{\Huge{\textbf{ALGEBRA LINEARE}}}}
\author{\color{blue}{\Huge{\textbf{???}}}}
\date{27 Febbraio 2021 $-$ xx Mese Anno}

\frontmatter

\maketitle

\dominitoc

\tableofcontents

\newpage

\section*{PREFAZIONE GENERALE}
\addcontentsline{toc}{section}{\protect\numberline{}PREFAZIONE GENERALE}

\mainmatter

\chapter{NOTAZIONI PRELIMINARI}
\minitoc %\minilof\minilot
\mtcskip
\pagestyle{plain}

\section{??}

\newpage

\part{\huge\color{red}{FONDAMENTI DELL'ALGEBRA LINEARE}}

\section*{Prefazione alla Prima Parte}

\addcontentsline{toc}{section}{Prefazione alla Prima Parte}
\Large{Inserire una Prefazione}

\chapter{One}
\minitoc %\minilof\minilot
\mtcskip

\section{One.One}

\end{document}
3
  • Yes, we need a MWE.
    – Teepeemm
    Commented Aug 15, 2021 at 0:51
  • Why do you have \addcontentsline{toc}{section}{Prefazione alla Prima Parte}?
    – Teepeemm
    Commented Aug 15, 2021 at 1:10
  • Because I want that "Prefazione alla Prima Parte" is only in \tableofcontentes and not in minitoc of chapter 0.
    – Puck
    Commented Aug 15, 2021 at 1:13

1 Answer 1

1

Inspired by https://tex.stackexchange.com/a/197066/107497, you need to tell minitoc that the part has begun. So add \addtocontents{toc}{\protect\partbegin} before the \part command.

By the way, you shouldn't add color/sizing/capitalization to your title/part/chapter/section commands. If you're wanting that styling, you should modify those commands (eg with the titlesec package).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .