emacs-devel
[Top][All Lists]
Advanced

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

Re: Increase default `line-spacing' to 0.05, 0.10 or 0.15 [proposal]


From: Gregory Heytings
Subject: Re: Increase default `line-spacing' to 0.05, 0.10 or 0.15 [proposal]
Date: Thu, 06 May 2021 17:01:36 +0000


\baselineskip=0pt means that the height and depth of a text line is equal to the maximal height and depth of the characters in that line. See the attached two screenshots that demonstrate the difference.

That's what Emacs does as well, when line-spacing is nil, but Augusto says they are different.

Unless I'm missing something, that's not what Emacs does, no. I attach two screenshots of the exact same text with the exact same font, one with Emacs (setq line-spacing nil) and the other with TeX (\baselineskip=0pt). The effect is very different.

Then your description of what TeX does is probably incomplete or inaccurate.


The TeXbook says: "Whenever a box is added to a vertical list [i.e., a line is added to a page under construction], TeX inserts "interline glue" intended to make the distance between the baseline of the new box and the baseline of the previous box exactly equal to the value of \baselineskip."

In more detail, the line-spacing algorithm also uses \lineskip, whose default value is 1pt. If you set both \baselineskip and \lineskip to 0pt, there is no vertical space whatsoever between the lines, see the attached screenshot.


on the Emacs side, I can point you to the code which implements line-spacing, which clearly shows that if line-spacing is nil, the default, we add NOTHING (a.k.a. "zero") to the height of the line, leaving it at its computed value of the sum of the maximum ascent and maximum descent of the glyphs in that line.


Of course I trust you. Perhaps Emacs has a different understanding of what the ascent and descent of a glyph is? Otherwise a line of dots would use less vertical space than a line of X's, which is what happens with TeX with \baselineskip=0pt and/or \lineskip=0pt.

Anyway, I'm not sure all this is really important for this discussion.

Attachment: tex.png
Description: PNG image


reply via email to

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