TeX - LaTeX Asked on May 26, 2021
In the tableofcontents chapters and sections in the backmatter are pointing to chapters and sections in the mainmatter. Interestingly this is not the case with the book class. Do I have a misconception on backmatter and tableofcontents?
.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
You get warnings about duplicated destination names in the log. You need to make them unique, e.g.
documentclass{scrbook}
usepackage{hyperref}
begin{document}
frontmatter
tableofcontents
chapter{Chapter}
mainmatter
chapter{Chapter}
section{Section}
subsection{Subsection}
backmatterrenewcommandtheHsection{backmatter.thesection}
chapter{Backmatter Chapter}
section{Backmatter Section}
subsection{Backmatter Subsection}
end{document}
Correct answer by Ulrike Fischer on May 26, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP