
目次に問題があります (ローカルとグローバルの両方)
メインの目次に、前の章のミニ目次には表示されないセクション行を含めたいと思います。また、この行をメインの目次の前の章のセクションから少なくとも 1 行の空行で区切るようにしたいと思います。
最小限の動作例を作成してみましたが、この例では、「図」の行が第 2 章のミニ目次に追加され、メイン目次の第 2 章に属しているように見えます。
\documentclass[a4paper, 12pt, twoside]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{minitoc}
\setcounter{minitocdepth}{2}
\begin{document}
\dominitoc
\tableofcontents
\chapter{The important things}
\minitoc
\section{foo}
\section{bar}
\chapter{Minor stuff}
\minitoc
\section{foo}
\section{bar}
\listoffigures
\addcontentsline{toc}{section}{Figures}
\end{document}
答え1
と述べることで\addcontentsline{toc}{section}{Figures}
、OP は既存の章 (第 2 章) に「図」セクションを追加しています。したがって、これは toc と minitoc の第 2 章の下に表示されます。修正方法は、図リストをセクションではなく独自の章として toc に追加することであり、これは で実現されます\addcontentsline{toc}{chapter}{Figures}
。
MWE は次のとおりです。
\documentclass[a4paper, 12pt, twoside]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{minitoc}
\setcounter{minitocdepth}{2}
\begin{document}
\dominitoc
\tableofcontents
\chapter{The important things}
\minitoc
\section{foo}
\section{bar}
\chapter{Minor stuff}
\minitoc
\section{foo}
\section{bar}
\listoffigures
\addcontentsline{toc}{chapter}{Figures}
\end{document}
もちろん、これにより、目次の「図」が章のスタイルで配置されます。
次のように手動でセクションのように見せることもできます。
\documentclass[a4paper, 12pt, twoside]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{minitoc}
\setcounter{minitocdepth}{2}
\makeatletter
\newcommand \Dotfill {\leavevmode \cleaders \hb@xt@ .79em{\hss .\hss }\hfill \kern \z@}
\makeatother
\begin{document}
\dominitoc
\tableofcontents
\chapter{The important things}
\minitoc
\section{foo}
\section{bar}
\chapter{Minor stuff}
\minitoc
\section{foo}
\section{bar}
\listoffigures
% \addcontentsline{toc}{chapter}{Figures}
\addcontentsline{toc}{chapter}{\mdseries\hspace{1.5em}Figures\Dotfill}
\end{document}
については\Dotfill
、私は次の答えを採用しました。\dotfill のドット間隔を変更するにはどうすればいいですか?