我想更改包生成的目录条目appendix
(而不是附录章节的条目),使其与文档中的“部分”大小相同。我该怎么做?
\documentclass[10pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[toc,page]{appendix}
% Packages that may have an impact but probably not.
\usepackage[nottoc, notlof, notlot]{tocbibind}
\usepackage[hidelinks,bookmarksnumbered]{hyperref}
%%%%%
\begin{document}
\tableofcontents
\part{Part I}
\chapter{Chapter 1}
\begin{appendices}
\chapter{Appendix 1}
\end{appendices}
\end{document}
答案1
\begin{appendices}
调用基本上\appendixpage
反过来使用\addappheadtoc
,最近设置\addcontentsline
或\addtocontents
,根据hyperref
使用情况,两者都chapter
作为入门级
最简单的方法是用 进行修补\addappheadtotoc
并chapter
替换part
:
\documentclass[10pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[toc,page]{appendix}
% Packages that may have an impact but probably not.
\usepackage[nottoc, notlof, notlot]{tocbibind}
\usepackage[hidelinks,bookmarksnumbered]{hyperref}
%%%%%
\usepackage{xpatch}
\xpatchcmd{\addappheadtotoc}{%
{chapter}%
}{%
{part}%
}{\typeout{success}}{}
\begin{document}
\tableofcontents
\part{Part I}
\chapter{Chapter 1}
\begin{appendices}
\chapter{Appendix 1}
\end{appendices}
\end{document}