0

I'm working with a list of definitions (LOD) that wich, in essence, is the one presented in the following pice of code (except for the numbering). I am running into the issue that, for large numbers, the numbering and caption on the LOD have some overlay. I want to increase the separation from the numbering and the caption of all defininitions (items) of my LOD. I tried ussing \setlength{\cftdefnumwidth}{} (which I found on a simmilar question) but it doesn't work ("undefiend control sequence"). How can I increase the separation of my numbering and caption of every item of my LOD?

What follows is a MWE of my LOD with five items on it, each n-th item with numbering 10^(n-1) to showcase the problem I'm ecountering. A figure is later included to show the resulting PDF that follows from the code.

\documentclass{report}    
\usepackage{tocloft}

\newlistof{definitions}{def}{Definitions} %making of the list

\newcommand{\defil}[1] %creating the command for adding definitions to the list (and numbering them) {% \refstepcounter{definitions} \addcontentsline{def}{definitions} {\protect\numberline{\thedefinitions}#1}\par }

\begin{document} \listofdefinitions %including the list

\defil{lorem ipsum} %adding element "lorem ipsum" to the list of definitions

\addtocounter{definitions}{8} %adding one digit to the numbering \defil{lorem ipsum} %adding element "lorem ipsum" to the list of definitions

\addtocounter{definitions}{89} %adding one digit to the numbering \defil{lorem ipsum} %adding element "lorem ipsum" to the list of definitions

\addtocounter{definitions}{899} %adding one digit to the numbering \defil{lorem ipsum} %adding element "lorem ipsum" to the list of definitions

\addtocounter{definitions}{8999} %adding one digit to the numbering \defil{lorem ipsum} %adding element "lorem ipsum" to the list of definitions

\end{document}

Result from the previous code

1 Answers1

0

I managed to solve the question by adding the following piece of text on my preamble:

\makeatletter
  \renewcommand\l@definitions{\@dottedtocline{1}{5em}{3em}}
\makeatother

The third parameter (the one containing "3em") corresponds to the numwidth, that is, the size of the boox containing the numbering. Increasing the value of this parameter will increase the desired separation. Here you can find a full solution to the problem of creating you own list of [blank]. By searching "numwidth" on the site you will find a post that has a more detailed description of what this code does.