내 논문의 경우 몇 개의 챕터를 별도로 작업하고 있으며 이 챕터를 내 기본 .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}