Para minha tese, estou trabalhando com alguns capítulos separadamente e estou incluindo esses capítulos em meu .tex
arquivo principal. Eu defini meu prefácio com \chapter*{Preface}
. Para adicionar o Prefácio ao Índice, usei \addcontentsline
. Para o cabeçalho que usei \chaptermark
.
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\chaptermark{Preface}
Isso funcionou perfeitamente até que percebi que meu mini índice de outros capítulos não aparecia mais depois que eu compilei. Eu compilei várias vezes sem alterações. O que posso fazer para que eles apareçam enquanto tenho meu Prefácio no Índice com o cabeçalho correto.
\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}
Eu ficaria feliz se alguém ajudasse nesta questão.
Editar: aqui simplifiquei meu código para fazer um exemplo funcional. Sinceramente não sei se minitoc
funciona em report
aula já que quando comento a parte do Prefácio minitoc
não funciona de jeito nenhum. (Normalmente eu uso uma aula para tese e minitoc
funciona se não adicionar o Prefácio no Índice.)
\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}
Responder1
Declarações explícitas \addcontentsline
para unidades de estrutura estreladas confundem a contagem e os vários arquivos auxiliares do minitoc. É por isso que \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}