Unwanted spacing in Table of Contents

Steve Litt slitt at troubleshooters.com
Mon Jan 25 09:47:48 UTC 2021


On Sun, 24 Jan 2021 10:12:45 +1100
Anthony Macks <anthonymacks at gmail.com> wrote:

> Dear All,
> 
> I have attached my LyX file and its pdf output.
> 
> For some reason, the spacing between sections  and subsections in my
> table of contents is very large.
> 
> In fact, it appears that the items in the TOC are being distributed
> evenly over the length of the page.
> 
> I am running Lyx 2.3.5.2 on Windows 10 on a Surface Pro.
> 
> Any help is much appreciated.
> 
> Kind Regards,
> Anthony

This is how I vertically condense the Table of Contents:

% ### Modify table of contents to be more vertically condensed. ###
\renewcommand\tableofcontents{%
    \if at twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    {
      \small\setlength{\parskip}{4pt}\setstretch{0.8}%
      \@starttoc{toc}%
    }
    \if at restonecol\twocolumn\fi
    }


I just put it in my layout file and I'm good to go.

SteveT

Steve Litt 
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive


More information about the lyx-users mailing list