私の論文では、いくつかの章を別々に扱っており、これらの章をメイン.tex
ファイルに含めています。序文は で定義しました\chapter*{Preface}
。序文を目次に追加するために を使用しました\addcontentsline
。ヘッダーには を使用しました\chaptermark
。
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\chaptermark{Preface}
これは完璧に機能していましたが、コンパイル後に他の章のミニ目次が表示されなくなったことに気付きました。何度かコンパイルしましたが、変化はありません。正しいヘッダーが付いた序文を目次に含めて、ミニ目次を表示するにはどうすればよいでしょうか。
\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}
この問題について誰かが助けてくれると嬉しいです。
minitoc
編集: ここでは、実用的な例を作成するためにコードを簡略化しました。正直なところ、クラスで機能するかどうかはわかりません。report
コメントすると序文の部分がminitoc
いずれの場合でも機能しないためです。(通常、論文にはクラスを使用し、minitoc
目次に序文を追加しない場合は機能します。)
\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}
答え1
星印付きの構造単位の明示的な\addcontentsline
記述は、カウントと複数の minitoc 補助ファイルを混乱させます。これが理由です\addstarredchapter
:
\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}