Hi,
First of all, I apologize because I do not speak German so I have to ask in English.
I have made this minimal example where I'm trying to put "Chapter" + "it's number" in front of every chapter in the TOC.
\documentclass[chapterprefix]{scrbook} \newcommand\chapterentrynumberformat[1]{\chapapp\ #1} \RedeclareSectionCommand[ tocentrynumberformat=\chapterentrynumberformat, tocnumwidth=5.5em ]{chapter} \usepackage{blindtext} \begin{document} \frontmatter \tableofcontents \listoftables \mainmatter \blinddocument \appendix \blinddocument \end{document}
It works well except because it uses "Chapter" and not "Appendix" in front of appendix entries. I attach an image to show it.
I have tried with:
\newcommand\chapterentrynumberformat[1]{\chapappifchapterprefix\ #1}
but there is no change.
I'm using koma-script 3.25.
What I can be wrong?
Thank you.
[Admin-Edit:]
Anhang | Größe |
---|---|
toc.png | 66.12 KB |
\chapapp while \tableofcontents
The
\tableofcontents
of you document is at the main part of your document, not at the appendix. So while the\tableofcontents
in your document is executed,\chapapp
ist “Chapter”, not “Appendix” while usage of\chapterentrynumberformat
for the whole table of contents. You need to add\chapapp
to the writing of the entries not the reading of them. You can do this, changing\addchaptertocentry
, e.g.:Compare the *.toc file with and without this change to see the difference.