# [texhax] TeX Queries (2)

Paul Isambert zappathustra at free.fr
Fri Jul 13 10:09:29 CEST 2012

Paul Stanley <paulrichardstanley at gmail.com> a écrit:
>
> "The |\/|' tells \TeX\ to add an \break
> % makes the line tighter, to be fair
> {\sl^{italic correction}\/}'' to the previous letter, depending on
> that letter; this correction is about four times as much for an $f$'
> as for a $c$', in a typical italic font."
>
> What does the author mean by "makes the line tighter"?

If the artificial break weren't there the line would be stretched too
much; in other words, it's just a hand-made justification.

> What does "italic correction" actually mean?  I understand the idea
> behind the \/' and how it addresses the problem of the slanting
> character taking up too much of the space that separates it from the
> next character in a roman font.  What I haven't been able to
> ascertain  from the TeXBook --- and would therefore be grateful for
> some elucidation from the list --- is the visual effect of the
> "correction".  for example, what does he mean by correction is about
> 4 times etc. ?

The italic correction adds a thin kern whose width depends on the
preceding character; for instance, after an f', it is much larger than
after a c', because in the former, the difference between the glyph's
declared width and its real, visual width, i.e. its rightmost point,
is much larger than in the latter. You can try this:

\def\checkitalic#1{%
\bgroup
\setbox0=\hbox{\it#1\/}
\setbox1=\hbox{\it#1}
\dimen0=\dimexpr\wd0-\wd1
\count0=\numexpr100*\dimen0/\wd0
\par\noindent
The width of the italic correction is \the\dimen0,
\the\count0 \% of the glyph's width (\the\wd0\ vs. \the\wd1).
\egroup
}

\checkitalic{f}
\checkitalic{c}

\bye

Now, it is always the case that the widths of glyphs is different from
the coordinate of their rightmost point; generally, the width is
smaller, but in cases like f' it is larger. Such sidebearings (here,
right sidebearing), as they are called, are crucial when glyphs sit next
to each other, otherwise they would be in contact -- or, in the case of
f', the next glyph would seem much too far.

> My  apologies for revisiting this. Only problem is that i can't find
> the previous thread on the subject.
>
> 1: \thinspace bla bla ''{'}
>
> 2: {}rabit rabit {'}''
>
> In 1 I'm assuming that the space between the two opening quote marks
> needs to be widened, hence, my use of \thinspace', however, the
> space between the two closing quotes is sufficient although the
> closing single quote needs to be separated from the closing double
> quote mark, hence the {}'
>
> In 2 I've only applied the separation technique as it were with the
> {}' grouping braces, assuming that the default spacing between the
> quote marks is the right width.
>
> of course, I could be entirely wrong in both cases
> So, without further ado, over to the list.

You don't need \thinspace in the first case, and {} is perfectly ok.
But you need it in case 2, as explained in the TeXbook: the combination
outer-single-quote + inner double-quote is ok, the other way around is
not. (Why? I don't know; it seems to favor the British way over the
American way, which is surprising, since Don Knuth is American; but
there probably are other reasons.)

Best,
Paul