Minitoc 适用于 \appendix

Minitoc 适用于 \appendix

我希望我的附录在目录中看起来像这样(附录为 a \chapter,而不是 a ,\section并且标题前有“附录”):

附录 A 示例 1
A.1 副标题 1
A.2 副标题 1

附录 B 示例 2
B.1 副标题 2
B.2 副标题 2

我还想保留附录中的图编号:A.1、A.2、B.1、B.2 等等。我想为每个附录创建一个 minitoc

以下是我创建的 mwe:

\documentclass[11pt,a4paper,french]{book}

\usepackage{minitoc}
\dominitoc

\usepackage{appendix}


\begin{document}


\tableofcontents

\appendix

\chapter*{Example 1}
\addstarredchapter{Apendix A Example 1}
\renewcommand{\thesection}{A.\arabic{section}}
\renewcommand{\thesubsection}{A.\arabic{section}.\arabic{subsection}}
\renewcommand{\thesubsubsection}{A.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
\renewcommand{\thefigure}{A.\arabic{figure}}
\minitoc

Content of appendix A


\chapter*{Example 2}
\addstarredchapter{Apendix B Example 2}
\renewcommand{\thesection}{B.\arabic{section}}
\renewcommand{\thesubsection}{B.\arabic{section}.\arabic{subsection}}
\renewcommand{\thesubsubsection}{B.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
\renewcommand{\thefigure}{B.\arabic{figure}}
\minitoc


Content of appendix B


\end{document}

使用此代码,标题可以在目录中很好地显示,并且图形编号正确,但没有显示 minitoc 和带有“附录 A”的章节标题。

如何在章节标题中显示 minitoc 和“附录 A”?

相关内容