Unwanted spacing in Table of Contents

Richard Kimberly Heck rikiheck at lyx.org
Sun Jan 24 17:36:30 UTC 2021


On 1/24/21 4:56 AM, John Beattie wrote:
> On 2021-01-23 19:58 -0500, Richard Kimberly Heck wrote:
>> On 1/23/21 6:12 PM, Anthony Macks 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.
>> You should use New Page rather than Page Break. The latter stretches the
>> page, just as you are seeing; the former does not. See section 3.5.5 of the
>> User Guide. I agree it is not very clear what the difference is from the
>> menu or the display. If you have any ideas what would make it clearer,
>> please let us know.
>>
>> Riki
>>
>
> Thank you for pointing out that very useful section of the guide.  I think I
> have been using Page-Break and New-Page rather indiscriminately, usually to
> avoid having a single line of a paragraph at the bottom of a page. 

The preferred way to do that is with preamble code.

The old way was to do it manually:

\widowpenalty=10000
\orphanpenalty=1000

But nowadays there's a package to do it: nowidow. Just install the
nowidow package and then put in the premable:

\usepackage{nowidow}


> Re your request, I see that the equivalents for forcing line breaks have more
> descriptive names.  I suggest that the thing to change is name of Page Break, so
> as to include the 'break' part and also the 'spread' part.
>
> Or, on writing that, it occurs to me that Ragged-Page-Break and
> Justified-Page-Break might actually do the job?

This is hard. At least for me, "Justified" indicates horizontal space.
I'll ask on lyx-devel too.

Riki




More information about the lyx-users mailing list