Para mi tesis, estoy trabajando con algunos capítulos por separado y los incluyo en mi .tex
archivo principal. He definido mi Prefacio con \chapter*{Preface}
. Para agregar el Prefacio a la Tabla de Contenidos he usado \addcontentsline
. Para el encabezado he usado \chaptermark
.
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\chaptermark{Preface}
Esto funcionó perfectamente hasta que me di cuenta de que mi mini índice de otros capítulos ya no aparece después de que los compilé. He compilado varias veces sin cambios. ¿Qué puedo hacer para que aparezcan mientras tengo mi Prefacio en la Tabla de Contenidos con el encabezado correcto?
\begin{document}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{3}
\dominitoc
\pagenumbering{roman}
\cleardoublepage
\parskip=2ex
\frontmatter
\begin{titlepage}
\maketitle
\end{titlepage}
\chapter{Dedication/dedication}
\chapter{Declaration/declaration}
\chapter{Acknowledgement/acknowledgement}
\chapter{Abstract/abstract}
\tableofcontents
\printnomenclature
\mainmatter
\chapter{Preface/preface}
\adjustmtc[0]
\chapter{Chapter1/chapter1}
\chapter{Chapter2/chapter2}
\backmatter
\listoffigures
\listoftables
\end{document}
Me alegraría que alguien me ayudara con este problema.
Editar: aquí simplifiqué mi código para hacer un ejemplo funcional. Sinceramente no sé si minitoc
funciona en report
clase ya que cuando comento la parte del Prefacio minitoc
no funciona en ningún caso. (Normalmente uso una clase para tesis y minitoc
funciona si no agrego el Prefacio en la Tabla de Contenido).
\documentclass[a4paper]{report}
\usepackage{minitoc}
\begin{document}
\dominitoc
\chapter*{Dedication}
\chapter*{Declaration}
\chapter*{Acknowledgement}
\chapter*{Abstract}
\tableofcontents
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\chaptermark{Preface}
\adjustmtc[0]
\chapter{Chapter 1}
We will have two sections here.
\section{AA}
Here, I have my first section.
\section{BB}
This is my second section.
\chapter{Chapter2}
\section{CC}
This is the CC section.
\chapter{Chapter 3}
\section{DD}
This is the DD section.
\listoffigures
\listoftables
\end{document}
Respuesta1
Las declaraciones explícitas \addcontentsline
sobre unidades de estructura con asterisco confunden el conteo y los diversos archivos auxiliares de minitoc. Por eso \addstarredchapter
existe:
\documentclass[a4paper]{report}
\usepackage{minitoc}
\begin{document}
\dominitoc
\chapter*{Dedication}
\chapter*{Declaration}
\chapter*{Acknowledgement}
\chapter*{Abstract}
\tableofcontents
\chapter*{Preface}
\addstarredchapter{Preface}
\chaptermark{Preface}
\chapter{Chapter 1}
\minitoc
We will have two sections here.
\section{AA}
Here, I have my first section.
\section{BB}
This is my second section.
\chapter{Chapter2}
\minitoc
\section{CC}
This is the CC section.
\chapter{Chapter 3}
\minitoc
\section{DD}
This is the DD section.
\listoffigures
\listoftables
\end{document}