5

I am using the memoir class to generate a book manuscript. The table of contents entry for Part VIII overlaps with the part title which is Examinations. The result is shown below:

TOC overlap

Is there a way to avoid or correct this?

Note that there is no problem on the actual page itself denoting that part; only in the TOC.

memoir seems to use Roman numerals as default for parts. I have not found a way to change part numbering to alphabetic, which might be a sensible workaround.

7

You can change the width of the number in the TOC using the \cftpartnumwidth length. See Chapter 9 of the memoir manual. Alternatively, you can redefine \thepart to use uppercase alphabetic numbering (as in Werner's answer).

\documentclass{memoir}
\setlength{\cftpartnumwidth}{4em} % change the width of the part number
%\renewcommand{\thepart}{\Alph{part}} % change part numbering to Alphabetic
\begin{document}
\tableofcontents
\setcounter{part}{21}

\part{A part}
\chapter{A chapter}
\part{Another part}
\chapter{A chapter}
\end{document}

output of code

4

If changing to (uppercase) alphabetic numbering for parts solves your problem, then the following is all you need in your document preamble:

\renewcommand{\thepart}{\Alph{part}}
4

Teaser: In current memoir, there is some undocumented hooks into the TOC macros, such that it is able to record the widest chapter, section etc. number part in the TOC. (Cannot remember if I added a hook for part as well). If used correctly this can be used to automatically adjust the sizes of the number boxes in the TOC such that manual intervention is not needed (just a few extra compilations). I've used it successfully in a few projects. In the future I may add some features to utilize these hooks. (problem is that their use depend on the design of the TOC, so a general solution may be a bit difficult))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.