+1 vote

TeX has a limit on how close it will let lines be together. The basis for this is the height+depth of the font. You can find this by looking at the font size in the \p style. Notice this can be a whole lot more than the point size of the font. Awami for example has a height of 19.3pt and a depth of 7pt when set at 11pt!.

If the height plus depth of the font is greater than 1.75 x the linespacing, TeX will work as if the linespacing is equal to the height plus depth. More precisely the limit is the baselineskip of the style + 0.75 the main linespacing.

You can change this under the hood by setting \lineskiplimit to some suitably large negative value. Currently it is -0.75 * linespacing. But only do this if you know what you are doing and you really do need to get lines closer together.

Once you hit this limit, you can kiss goodbye to any control via \baselineskip and a new value \lineskip (0pt) gets inserted between lines.

Example

Let's say that you wanted to use Awami at 11pt but you really want the line spacing to be 14pt and you don't care if lines collide (which they would almost certainly do so). We start by looking at the \p style definition in which we see that the font has an ascent of 19.3pt and descender of 7pt, for a total of 26.3pt.
TeX calculates the interline gap as being the baselineskip - (height+depth), which = 14-26.3 = -12.3pt. Thus we would need a lineskiplimit of -12.3pt or lower. The default value of lineskiplimit is -0.75*linespacing = -10.5pt which is too high and so we would want to change the lineskiplimit. We do this in `ptxprint-mods.tex` with a line such as:
```
\lineskiplimit=-12.5pt
```
(-12.5pt gives us a tiny amount of wiggle room).
Be aware that this can easily result in lines crashing into each other. On your head be it if you make a mess!
PTXprint by (366 points)
edited by

1 Answer

0 votes
Thank you for this information. I wanted to ask a question related to this, because I have wanted to reduce line spacing. You said one could get around the line spacing limitation with the \lineskiplimit command. Is that entered in changes.txt? "(Y)ou can kiss goodbye to any control" sounds scary. Presumably that is only as long as the \lineskiplimit is present? One can get that control back by deleting the \lineskiplimit command, I presume. Or is that not right?

Can you give me an example of the exact code one should enter in changes.txt?

Thanks.
by (116 points)
I've updated the main question to address this. Hopefully it is sufficiently clear.
"Presumably that is only as long as the \lineskiplimit is present"
No, lineskiplimit is always present, but the massive ascent and descent of Awami is causing problems for the default "surely this is safe" value.
Setting lineskiplimit as Martin has indicated is the way to **regain** control of the linespacing (at the cost of possibly overlapping lines).

If you don't care about regular line spacing, but you do want your lines of text to never overlap, then setting lineskiplimit to 0pt and setting \XeTeXuseglyphmetrics=1  will earn the ire of typesetters around the world but get you what you want.
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
And I tell you that you are Peter, and on this rock I will build my church, and the gates of Hades will not overcome it.
Matthew 16:18
2,628 questions
5,369 answers
5,045 comments
1,420 users