Hi all,
I'm using the scrbook class for my document. My document is divided into multiple parts. However, the entries for the parts in the Table of Conents only contain the \thepart and not \partname. At the moment the entries look like: "I. Introduction" and "II. Technical Details" while I want them to look like: "Part I. Introduction" and "Part II. Technical Details".
Any help is much appreciated.
No problem
If you are using an up-do-date KOMA-Script release, you may simply use
Thanks for the reply. Your
Thanks for the reply. Your command kind of works. The problem is that now "Part I" becomes too long and falls on top of the actual part name. So there is something wrong with the length calculation somewhere. I looked at the code for \addtocentrydefault in scrbook.sty and it uses \protect\numberline{} for the part number, which apparently uses a wrong width.
I got it working at the end with the following:
Many thanks for your help.
Without complete, minimal
Without complete, minimal example I'm not able to decide wether the length calculation for
\numberline
is enabled or not and works or not. By default, there's no length calculation but fix lengths are used (see\l@part
). With optiontoc=flat
auto-length-calculation would be used, but maybe this is not a good choice for such part entries.BTW: Better auto-length-calculation will be available with package tocstyle. See tocstyle.pdf for more information.
Using
\partname
before\numberline
may break features of toc packages or of toc display with KOMA-Script classes. There's no support for this! You're definition may also break part entries without numbers!Here's a minimal example
Here's a minimal example which illustrates the problem:
I will look into tocstyle. Thanks for the tip.
With this setings you are not
With this settings you are not using any auto-length-calculation. You may try
to use the auto-length-calculaton of ALPHA package tocstyle or
to use the auto-length-calculation of scrbook but with another toc layout.
Or you may change
\l@part
to manually set up another length for the part number.Thanks for the explanations.
Thanks for the explanations.