![将附录的目录条目更改为与部分相同的大小](https://linux22.com/image/318780/%E5%B0%86%E9%99%84%E5%BD%95%E7%9A%84%E7%9B%AE%E5%BD%95%E6%9D%A1%E7%9B%AE%E6%9B%B4%E6%94%B9%E4%B8%BA%E4%B8%8E%E9%83%A8%E5%88%86%E7%9B%B8%E5%90%8C%E7%9A%84%E5%A4%A7%E5%B0%8F.png)
我想更改包生成的目录条目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}