[texhax] TeX Queries (2)
Paul Isambert
zappathustra at free.fr
Sat Jul 14 09:01:18 CEST 2012
Reinhard Kotucha <reinhard.kotucha at web.de> a écrit:
>
> On 2012-07-13 at 14:50:54 -0400, Barbara Beeton wrote:
>
> > regarding multiple quotes,
> >
> > On Fri, 13 Jul 2012, Reinhard Kotucha wrote:
> >
> > I vaguely remember that double quotes are ligatures in TeX. This
> > could probably explain why both examples yield different results.
> >
> > for the computer modern fonts, double quotes
> > are definitely ligatures. so two quotes in
> > a row (either leading or trailing) will
> > produce a "designed" double quote. thus,
> > if three quotes are input together as ```,
> > tex (using computer modern) will interpret
> > the first two as a double, and only one
> > remains. thus, if a single quote is to be
> > first, it has to be isolated in braces.
> >
> > i can't speak for fonts that don't have tfm
> > files; presumably any font for which a tfm
> > file has been created will have been adjusted,
> > if necessary, to follow the tex conventions.
> > but i'm sure it can't be guaranteed for
> > "system" fonts as used by xetex or luatex.
>
> I used pdftex for testing. The only difference between pdftex and
> Knuth's tex in this respect is the output format. Regarding fonts, in
> TeX Live both engines are using the Blue Sky Research Type 1 fonts.
> It would be strange if the tfm files are different from Knuth's,
> especially because they are preloaded in the format files, which are
> created from exactly the same source in both cases.
Actually PDFTeX uses TFM's; the Type1 fonts are simply embedded in the
PDF (and expected to be similar to the TFM's), but for the meaningful
information (glyphs' widths, ligatures, kerning), the TFM's are used.
For TTF/OTF fonts, XeTeX introduced the ``trep'' and ``tlig'' tags to
perform TeX's usual substitutions and ligatures: remember that the
characters at position 39 and 96 in ASCII aren't quotation marks at all
to begin with (so you have to substitute the real marks, which so many
people forget to do, a sin worse than using Comic Sans in my opinion :) );
then you have the ``quotation mark + quotation mark => double quotation mark''
ligature we're dicussing here, but also ``hyphen + hyphen => endash'',
not to mention ``question mark + left quotation mark => inverted
question mark'', etc. Such substitutions and ligatures are also easily
implemented in LuaTeX.
> But Paul Isambert said that according to the TeXbook, the second line
> in the following file requires \thinspace instead of braces. Paul, do
> you remember the page number?
>
> ---------------------------
> {`}`` bla bla ''{'}
> \par
> ``{`} bla bla {'}''
> \bye
> ---------------------------
Yes, page 5, or line 544 and following in the source.
Since we're at it, I forgot to mention that the use of brace to avoid
ligatures doesn't work in LuaTeX. You have to use a zero-width kern
instead, or anything else that doesn't affect the output visually.
Best,
Paul
More information about the texhax
mailing list