我已经成功将目录深度增加到附录的子部分。现在我想以同样的方式更改书签深度。目录和 PDF 书签应该具有相同的结构。也许有人对此有解决方案。提前致谢!
如果有人有更优雅的方法来对附录中的子部分进行编号,请告诉我:)
这是当前输出:
小例子:
\documentclass[
a4paper,
10pt,
numbers=noenddot,
]{scrreprt}
\usepackage{etoolbox}
\usepackage{footnotebackref}
\hypersetup{
bookmarksnumbered,
bookmarksdepth=2,
bookmarksopenlevel=1,
bookmarksopen=true,
}
\appto\appendix{\addtocontents{toc}{\protect\setcounter{tocdepth}{3}}}
\appto\appendix{\setcounter{secnumdepth}{3}}
\appto\appendix{\renewcommand*{\thesubsubsection}{\Alph{chapter}.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}}
\begin{document}
\tableofcontents
% Main part of document with depth down to subsection
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\appendix
% Appendix with depth down to subsubsection
\chapter{Appendix}
\section{Appendix Section}
\subsection{Appendix Subsection}
\subsubsection{Appendix Subsubsection}
\end{document}