# Re: The hyphenchar ligature in T1

```Bernd Raichle wrote:
>On Mon, 2 November 1998 17:07:21 +0100,
>Lars Hellström <Lars.Hellstrom@math.umu.se> writes:
> > For a while now, I have been curious about the
> >
> >    hyphen (\char45)  +  hyphenchar (\char127)  ->  hyphenchar
> >
> > ligature in T1 encoded fonts. I have some questions related to this
> > ligature, that I hope someone answer:
>
>T1 encoded fonts contain two glyphs for a hyphen.  Using EC fonts, the
>second hyphen glyph at position 127 is ``hanging''.
>
That perfectly well explains why there are two hyphens. Thanks. (And also
thanks to the others that answered.)

> > 1. When is this ligature ever used?
>[...]
>
>If \hyphenchar\font=127 and a combined word with an explicit hyphen
>(i.e. hyphen glyph at position 45) is used, this ligature is
>necessary, otherwise two hyphens will appear at a line break.  This
>case is very often in languages like german where very long combined
>words with or without explicit hyphen are usual
>(``Donau-Dampfschiffahrtskapit\"anspatent-Anwartschaft'' ;-).
>
They are not too uncommon in Swedish either. It seems however, that this
will only work if the hyphenation pattern dictionary includes a pattern
that says that a breakpoint is always allowed after an explicit hyphen. As
I understand it, such a pattern is not necessary when using OT1 as TeX then
automatically inserts a \discretionary{}{}{} after every occurence of the
\hyphenchar. Does this mean that you actually need to have two different
pattern dictionaries even for typesetting English---one for use with T1
fonts and one for use with OT1 fonts (provided, of course, that you use
both encodings) ?

>
> > 2. Would anything be different if the ligature was
> >    hyphen  +  hyphenchar  ->  hyphen
> >
> > If hyphen and hyphenchar are the same glyph then the printed output will
> > look the same in both cases, and if they are different then would it not be
> > more reasonable that the output contains the explicit hyphen that the user
> > actually typed instead of a hyphenchar? I suspect that it may be the case
> > that TeX does not use the same penalty for a linebreak after a hyphen in
> > the two cases (but I haven't bothered to check).
>
>The glyphs are the same, but the font metric of the glyph is
>different.  The glyph at position 127 is ``hanging'' thus you should
>better use the ``hyphenchar'' to get hanging punctuation w.r.t. the
>hyphen.
>
>Best wishes,
>  -bernd

Quite so; if this is how they differ (in case they do in a given font) then
the hyphenchar should be used at linebreaks, not the hyphen.

Still, I can't help wondering about the penalties. Is it not the case that
this arrangement causes PlainTeX's distinction between a break at a \-
(explicit or automatically inserted) and a break after an explicit hyphen,
penalized by \hyphenpenalty and \exhyphenpenalty respectively, to be lost?
(OTOH, does anybody recall missing it?)

Lars Hellström

```