0

In my old question I asked You how to delete \section* from \minitoc. Now I ask You how to create three different indices:

  1. Index of only parts (i.e. without chapters, sections, ...)
  2. An Index for each part (i.e. with chapters but without sections, ...)
  3. An Index for each part's chapter (i.e. with sections, ...).

I hope my question clear.

Thank you so much in advance

\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={ \pathtcb fill frame -- (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}

MS-SPO
  • 11,519
Puck
  • 1,208

0 Answers0