[texhax] TeX Queries (2): Artificial Break
zappathustra at free.fr
Sun Jul 15 10:13:31 CEST 2012
Paul Stanley <paulrichardstanley at gmail.com> a écrit:
> Then he adds \break after the word ``an'' so that TeX breaks the line
> here instead of elsewhere, because TeX's default result here is not very
> good. His remark about a tighter line comments on the use of \break, not
> italic correction at all.
> Thank you. It seems we were at cross purposes there. I won't ask you
> about the "default result"; however, I get the impression that
> without looking at the end result one wouldn't be able to make the
> necessary comparison and decide whether or not the `\break' insertion
> was preferable. By the way I do use a screen reader.
With the \break, TeX makes three lines for this subparagraph, as follows:
LINE 1: you get italicized and slanted words that look better. The `\/' tells TeX to add an
LINE 2: ``italic correction'' to the previous letter, depending on that letter; this correction
LINE 3: is about four times as much for an `f' as for a `c, in a typical italic font.
Without the \break, i.e. with TeX left to its own devices, you get four
lines as follows:
LINE 1: you get italicized and slanted words that look better. The `\/' tells TeX
LINE 2: to add an ``italic correction'' to the previous letter, depending on that letter; this
LINE 3: correction is about four times as much for an `f' as for a `c, in a typical italic
LINE 4: font.
The latter result isn't so bad, but the lines are quite stretched, and
of course there is that fourth single-word line, smaller than the
paragraph indentation, which is quite bad-looking.
Interestingly, I've browsed the first fifteen chapters of the TeXbook,
and I haven't been able to find any last line of a paragraph being
smaller than the indentation (at least when directly followed by an
indented paragraph). So it seems that Knuth paid much attention to that,
and what we're discussing here might be a situation where he had to
rely on \break to do so. (There aren't so many \break's elsewhere in
> Well then I wasn't exactly crystal clear. Let's try again: the width
> of a glyph is technically independent of the drawing of that glyph.
> Suppose for instance that a glyph's rightmost point is at x-coordinate
> 50; then the glyph's width could very well be 52. What I have called
> the ``real'' width is 50, and the ``declared'' width is 52; in other
> words, all glyphs have a little bit of space on either side so that
> adjacent glyphs don't touch.
> For some glyphs, however, and italic glyphs in particular, especially an
> italic ``f'', the declared width is smaller than the rightmost point; in
> the above example, the declared width would be, say, 48; that means that
> the glyph's right side hangs over the next glyph, which is generally
> good, as long as the next glyph is in italic too; with an upright
> parenthesis, things go wrong, hence italic correction.
> I hope I've been clearer this time!
> yes thank you, it is much clearer; though of course, I have some new
> questions (I aint letting go yet :) ):
I'll try to complement Reinhard's answer.
> How is the declared width actually measured (i.e. where are the start
> and end points of the declared width)?
That's up to the font designer; as Reinhard said, glyphs should simply
be able to go along without kerning in most cases.
> is there a declared height as well, and if so, can the declared width
> be different at different declared heights?
No, a glyph's height is its topmost point; vertical spacing, at least
in horizontal writing systems, deals with lines, not individual glyphs,
so there is no use in adjusting the latter.
> How can the declared width be less than the real width? I've this
> image of a painting taking up more space than is available on the
> canvas, or is it the case that the declared width can be less than
> the real width only in parts where kerning is possible? Incidentally,
> I'm using the term kerning in the original sense as defined by
> wikipedia (http://en.wikipedia.org/wiki/Kerning )
Reinhard answered to that. However, I'll add that your image of a canvas
isn't inaccurate, since in the days of metal typesetting some glyphs
extended outside their blocks.
> Does the algorithm determining the gap between two italic glyphs
> perform kerning --- shaving off the declared width --- on both
> adjacent glyphs, or just the preceding glyph?
Reinhard again answered to that. But note that there is no algorithm
determining kerning; instead, if kerning is to be performed between to
glyphs, that's only because it is declared as such in the font, i.e. the
font says there should be so much additional space (possibly negative)
between two glyphs.
More information about the texhax