我有这个问题:正如你所看到的
我想从minitoc中删除“ \section*{Prefazione alla Prima Parte}
” 。我该怎么做?MWE 有用吗?谢谢,并致以最诚挚的问候chapter 1
\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}
答案1
灵感来自https://tex.stackexchange.com/a/197066/107497,您需要告诉 minitoc 已经part
开始。因此在命令\addtocontents{toc}{\protect\partbegin}
前添加\part
。
顺便说一句,您不应该在标题/部分/章节/节命令中添加颜色/大小/大写。如果您想要这种样式,您应该修改这些命令(例如使用包titlesec
)。