在目录中,后记中的章节指向正文中的章节。有趣的是,书籍类并非如此。我对后记和目录的理解有误解吗?
.tex
\documentclass{scrbook}
\usepackage{hyperref}
\begin{document}
\frontmatter
\tableofcontents
\chapter{Chapter}
\mainmatter
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\backmatter
\chapter{Backmatter Chapter}
\section{Backmatter Section}
\subsection{Backmatter Subsection}
\end{document}
.toc
\contentsline {chapter}{\nonumberline Chapter}{iii}{chapter*.2}%
\contentsline {chapter}{\numberline {1}Chapter}{1}{chapter.1}%
\contentsline {section}{\numberline {1.1}Section}{1}{section.1.1}%
\contentsline {subsection}{\numberline {1.1.1}Subsection}{1}{subsection.1.1.1}%
\contentsline {chapter}{\nonumberline Backmatter Chapter}{3}{chapter*.3}%
\contentsline {section}{\numberline {1}Backmatter Section}{3}{section.1.1}%
\contentsline {subsection}{\numberline {1.1}Backmatter Subsection}{3}{subsection.1.1.1}%
\providecommand \tocbasic@end@toc@file {}\tocbasic@end@toc@file
答案1
您会在日志中收到有关目标名称重复的警告。您需要使它们唯一,例如
\documentclass{scrbook}
\usepackage{hyperref}
\begin{document}
\frontmatter
\tableofcontents
\chapter{Chapter}
\mainmatter
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\backmatter\renewcommand\theHsection{backmatter.\thesection}
\chapter{Backmatter Chapter}
\section{Backmatter Section}
\subsection{Backmatter Subsection}
\end{document}