[texhax] description of text in {\tt }

Uwe Lück uwe.lueck at web.de
Wed Jan 28 11:17:05 CET 2009


At 07:19 28.01.09, Pierre MacKay wrote:
>But I am puzzled by the statement that it is impossible to hyphenate 
>typewriter fonts.  Here is what I get in plain TeX.
>
>*\tentt
>*\showthe\font
> > \tentt .
><recently read> \font
>
>*\showhyphens{hyphenation}
>Underfull \hbox (badness 10000) detected at line 0
>[] \tenrm hy-phen-ation
>*\showthe\font
> > \tentt .
><recently read> \font
>
>which woud seem to indicate that \tentt has no trouble with hyphenation.
>I could turn it off by setting the \hyphenchar for \tentt to -1, or I 
>could set \lefthyphenmin to 10000 in any \tt environment, but the default 
>appears to be to permit hyphenation in a \tentt environment.

Just for this TeXnical point:

Your \showhyphens resulted in `\tenrm...' Plain TeX \showhyphens switches 
to \tenrm
(TeXbook p. 364), LaTeX \showhyphens to \normalfont. To see hyphenation 
under \tt,
\showhyphens{\tt hyphenation} (no hyphens). \tt \showthe\hyphenchar\font: -1.

I didn't learn this by frightening experience, but I read (in the TeXbook? 
where?) that this is a feature of cmtt, the rationale being that it is made 
"for nothing else than to typeset computer
code" (Reinhard). It is not a general problem with typewriter typefaces. 
For my letter class, I just switch to the appropriate positive 
\hyphenchar\font. -- And when I made it, just wanted to have something 
simple, at that time this was very important for me. And I wanted that it 
looks simple. If I think about what the reader will think about me, I still 
prefer something looking simple. (May change depending on situation.)

Cheers,

     Uwe L.



More information about the texhax mailing list