間違った章のミニトック

間違った章のミニトック

私は論文を書いていますが、文書の冒頭に全体的な目次を、各章の冒頭に各章の目次を入れたいと思っています。そのために、パッケージを使用しますminitoc

コマンドをドキュメントの最後に配置すれば、\tableofcontentsすべて正常に動作します。代わりにドキュメントの先頭に配置すると、最初の章のミニ目次は印刷されず、次の章はずれてしまいます。2 番目の章には最初の章のミニ目次が、3 番目の章には 2 番目の章のミニ目次が、というように続きます。

\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

memoirToC 機能のいくつかの再定義が行われており、どうやらminitocこれに混乱しているようです。

ただし、これには解決策があります。コマンドminitocを提供すると\adjustmtc[...]、オプションの引数は minitoc の数を調整するためのもので、デフォルトでは 1 になります。

\adjustmtc最初に現れる前に言うことで\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}

ここに画像の説明を入力してください

関連情報