在我的老问题我问你如何\section*
从中删除\minitoc
。现在我问你如何创建三个不同的索引:
- 仅部分索引(即没有章节,部分......)
- 每个部分的索引(即有章节但没有章节,...)
- 每个部分章节的索引(即包含章节等)。
我希望我的问题清楚。
提前感谢
\PassOptionsToPackage{svgnames, x11names, dvipsnames}{xcolor}
\documentclass[openany]{book}
% \usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[a4paper,top=3cm,bottom=3cm,left=1.5cm,right=1.5cm]{geometry}
\usepackage[backend=biber, style=alphabetic, sorting=ynt]{biblatex}
\usepackage{sectsty}
\chapterfont{\color{Gold1}}
\sectionfont{\color{Silver}}
\usepackage[english]{babel}
\usepackage[tight,english]{minitoc}
\usepackage[nonewpage]{imakeidx}
\usepackage{stix}
\usepackage[notext, nomath, not1, notextcomp, upint]{stix2}
\usepackage[most]{tcolorbox}
\tcbuselibrary{breakable,theorems,skins}
\usetikzlibrary{shapes.misc, shapes.geometric, decorations.pathreplacing, decorations.markings, backgrounds}
\usepackage[colorlinks=true]{hyperref}
\title{My Book Template}
\author{MATTIA ONOFRI}
\date{October 2023}
\begin{document}
\renewcommand{\mtifont}{\large\bfseries}
\renewcommand{\mtcfont}{\large\bfseries}
\renewcommand{\mtcSfont}{\large\bfseries}
\renewcommand{\mtcSSfont}{\large\bfseries}
\renewcommand{\mtcSSSfont}{\large\bfseries}
\mtcsetfont{minitoc}{*}{\huge\small}
\mtcsetfont{parttoc}{*}{\huge\small}
\maketitle
\Large
\frontmatter
\section*{General Preface}
% \addcontentsline{toc}{section}{Preface GENERALE}
\newpage
\begin{tcolorbox}
[breakable,enhanced,title=\Huge{INDICE GENERALE},colframe=orange,colback=Silver!35,colbacktitle=Gold1,fonttitle=\bfseries,coltitle=red,attach boxed title to top center={yshift=-0.25mm-\tcboxedtitleheight/2,yshifttext=2mm-\tcboxedtitleheight/2},boxed title style={boxrule=0.5mm, frame code={ \path[tcb fill frame]([xshift=-4mm]frame.west) -- (frame.north west) -- (frame.north east) -- ([xshift=4mm]frame.east) -- (frame.south east) -- (frame.south west) -- cycle; },interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) -- (interior.north west) -- (interior.north east) -- ([xshift=2mm]interior.east) -- (interior.south east) -- (interior.south west) -- cycle;} }] \csname @starttoc\endcsname{toc}
\end{tcolorbox}
\newpage
\doparttoc
\dominitoc
\mainmatter
\section*{Preface to the First Part}
\part{}
% \addcontentsline{toc}{section}{Preface to the First Part}
\parttoc
\chapter{}
\minitoc
\section{}
\section{}
\chapter{}
\minitoc
\section{}
\section{}
\addtocontents{toc}{\protect\tcbbreak}
\addtocontents{toc}{\protect\partbegin}
\part{}
\section*{Preface to the Second Part}
% \addcontentsline{toc}{section}{Preface to the Second Part}
\parttoc
\chapter{}
\minitoc
\section{}
\section{}
\chapter{}
\minitoc
\section{}
\section{}
\addtocontents{toc}{\protect\tcbbreak}
\addtocontents{toc}{\protect\partbegin}
\section*{Preface to the Third Part}
% \addcontentsline{toc}{section}{Preface to the Third Part}
\part{}
\parttoc
\chapter{}
\minitoc
\section{}
\section{}
\chapter{}
\minitoc
\section{}
\section{}
\addtocontents{toc}{\protect\tcbbreak}
\addtocontents{toc}{\protect\partbegin}
\section*{Preface to the Fourth Part}
% \addcontentsline{toc}{section}{Preface to the Fourth Part}
\part{}
\parttoc
\chapter{}
\minitoc
\section{}
\section{}
\chapter{}
\minitoc
\section{}
\section{}
\end{document}