Minitoc 錯誤章節

Minitoc 錯誤章節

我正在寫我的論文,我想要文件開頭的總目錄和每章開頭的每章目錄。為此,我使用該minitoc包。

如果我將\tableofcontents命令放在文件末尾,一切都會正確。如果我把它放在文件的開頭,則第一章的 minitoc 不會被列印,而接下來的章節會被移動。第二章有第一章的小故事,第二章的第三章等等。

\documentclass[a4paper,11pt,twoside]{memoir}
\usepackage{minitoc}

\dominitoc

\begin{document}

\tableofcontents
\listoffigures

\chapter{first}
\minitoc
\section{first first}
\section{first second}

\chapter{second}
\minitoc
\section{second first}
\section{second second}

\chapter{third}
\minitoc
\section{third first}
\section{third second}


\end{document}

答案1

memoir對 ToC 功能進行了一些重新定義,顯然minitoc對此感到困惑。

不過,有一個解決方案:minitoc提供\adjustmtc[...]命令,可選參數用於調整 minitoc 的數量,預設為 1。

\adjustmtc在第一個出現之前說出來\minitoc可以解決問題。

minitoc當我試圖找到這個問題的解決方案時,我發現這個很好的命令隱藏在文件中:如何在對開頁上的章節之前放置 minitoc?

請注意,minitoc自從其作者 JP Drucbert 於 2009 年去世以來,該軟體包基本上已無人維護。

\documentclass[a4paper,11pt,twoside]{memoir}
\usepackage{minitoc}

\dominitoc

\begin{document}

\tableofcontents
\adjustmtc
\listoffigures
\adjustmtc
\chapter{first}

\minitoc
\section{first first}
\section{first second}

\chapter{second}
\minitoc
\section{second first}
\section{second second}

\chapter{third}
\minitoc
\section{third first}
\section{third second}


\end{document}

在此輸入影像描述

相關內容