question about TOC

M.B. Schiekel mb.schiekel at posteo.de
Sat May 13 12:17:56 UTC 2023


Am 13.05.23 um 13:00 schrieb Ricardo Berlasso:
 >> ...
>> When the section numbers have 2 digits then in the TOC there is no space
>> between the section number and the following section header, i.e.
>>     1 Chapter-1
>>     1.1 Section-1.1
>>     ...
>>     1.10Section-1.10
>> ...
> ...
> \makeatletter
> \renewcommand\l at chapter{
>      \@dottedtocline{2}{1.5em}{3em}}
> \renewcommand\l at section{
>      \@dottedtocline{2}{1.5em}{3em}}
> \makeatother
> 
> That will change the spacing for chapters and sections, just play a bit
> with the numbers (most of the time you'll only need to change the 3em).
 > ...


Thank you, Ricardo,

well, I only needed the section changings, the chapter spacings with 2 
digits are correct.

In the meanwhile I found on stackexchange this suggestion:
https://tex.stackexchange.com/questions/436063/spacing-between-number-and-text-in-toc

\usepackage{tocloft}
\advance\cftsecnumwidth 0.5em\relax
\advance\cftsubsecindent 0.5em\relax
\advance\cftsubsecnumwidth 0.5em\relax

And this gives a fine output for me :-)

Thank you very much,
bernhard

-- 
M.B. Schiekel,
Email: mb.schiekel at posteo.de
Homepage: https://www.mb-schiekel.de/
GnuPG: https://keys.openpgp.org/




More information about the lyx-users mailing list