bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: toc multiline section titles misaligned in TeX


From: Gavin Smith
Subject: Re: toc multiline section titles misaligned in TeX
Date: Wed, 26 Jul 2023 18:54:57 +0100

On Tue, Jul 18, 2023 at 03:02:16PM -0600, Karl Berry wrote:
>     It's possible to do this by reading the toc file another time for
>     the sole purpose of getting the widths of the section numbers in
>     each chapter.
> 
> Yeah. Why I never did it. Thanks for tackling it.
> 
>     I think the output does not necessarily look ideal.  
> 
> Not ideal, but a vast improvement. Thanks.
> 
>     to narrow this space, leading the spacing after 2.10 and following
>     would be narrower (say 0.5 em rather than 1 em).  
> 
> So if there are 10+ sections, there would be 1.5em (instead of 2em)
> between 2.1-2.9 and the text, and 1em between 2.10 and the text?
> Yes, that could well look better. Have to see it to really know.

I've committed a change for aligning the sections in a chapter only.
(version 2023-07-26.15).  I will do the other levels of sectioning soon.

Making the spacing variable depending on the number of sections would
be harder to do, and I am not sure if the extra complexity is worth it.
(I had thought I could check the width of the typeset section number,
but hadn't realised there were section numbers like "10.1" where the
chapter number is two digits making the whole section number wider.)

> Another option might be to use (say) .75em as the constant additional
> space, so there would be 1.5em for 2.1 and .75 for 2.10.

I think this looks okay, but I would keep the spacing for the
chapter numbers the same.  I did this in version 2023-07-26.18
(commit 7da431cdfcf), using a narrower space of 0.6em.  It was
basically trial and error according to what looked good to my eye;
hopefully it's not too far off what looks good to people with more
refined judgment.

I wanted to keep the spacing of the chapter numbers the same so not
to change the Texinfo style too much.  I thought that a larger space
after the chapter number was more useful to separate it from the
chapter title, than for sections, where many adjacent sections (without
subsections), the section numbers would form a block that is more
visually distinct, reducing the need for space.

The output for @shortcontents should also be unaltered.

> 
> I feel strongly that the text of the section titles should align.
> I don't have strong feelings about the space between the section numbers
> and titles. Indeed, I've always thought it was rather too much, e.g.,
> the 1.1..1.6 cases in your example look to me like they could be
> tightened (a little, not a lot).
> 
> Thanks again,
> Karl
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]