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}

Puck
  • 1,208

1 Answers1

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).

Teepeemm
  • 6,708