# Overlapping numbers and titles in toc with hausarbeit-jura

I'm using the document class hausarbeit-jura (a document class for jura student papers).

The number of my 8th section (roman numbering "VIII") overlaps with the title of the section in the table of contents.

I already had a look at Overlapping numbers and titles in toc but when I add \addtolength{\cftsecnumwidth}{10pt} to my document I get the error message:

Undefined control sequence \addtolength{\cftsecnumwidth}{10pt}
Missing number, treated as zero \section
Illegal unit of measure (pt inserted) \section


Minimal working example:

\documentclass[12pt,utf8,headline,headlinetitlepageleft,nosuperscriptedition]{hausarbeit-jura}

\begin{document}
\tableofcontents
\addtolength{\cftsecnumwidth}{10pt}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}

\end{document}


Result looks like this:

Any ideas how to fix this? Thanks to everyone in advance! :-)

• Did you compile twice? For \cftsecnumwidth you need another package (tocloft iirc). – TeXnician Jun 3 '18 at 14:10
• Yes, I was missing the package! Thanks so far! Now my subthree, subfour and other sections are not intended correctly. I will try it myself first. – Yeti Jun 3 '18 at 14:19
• No need to load tocloft. You can use \AtBeginDocument{\sectionnumwidth=2cm} somewhere in your preamble. Same should be true for other levels. – Skillmon likes topanswers.xyz Jun 3 '18 at 15:43

## 1 Answer

The class does

\settowidth{\sectionnumwidth}{III.\ }


which is insufficient for accommodating VIII. You can use VIII instead.

%\UseRawInputEncoding % uncomment for TeX Live 2018

\documentclass[
12pt,
utf8,
headline,
headlinetitlepageleft,
nosuperscriptedition
]{hausarbeit-jura}

\AtBeginDocument{\settowidth{\sectionnumwidth}{VIII.\ }}

\begin{document}
\tableofcontents
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}
\section{TEXT}

\end{document}


The first line should be uncommented if TeX Live 2018 (more precisely LaTeX 2018-04-01), as the class has not yet been updated for UTF-8 support by default.

• That solved the problem. Thank you very much! – Yeti Jun 3 '18 at 21:14