5

This example:

\font\standard="Arial Unicode MS" at 10pt
\standard

\newlanguage\nohyphens
\language=\nohyphens

\hsize = 150mm
\parindent = 0pt

\vbox{
  \setbox2=\hbox{\hskip12pt‣\hskip3dd}
  \hangindent=\wd2\leavevmode\box2 kopf- und fußgesteuerte Schleife, boolesche Ausdrücke, boolesche Operatoren, Struktogramme, Struktogramme, Struktogramme, Struktogramme
}

\bye

gives this overfull hbox:

without tolerance

How can I tell TeX to put the first "Struktogramme" in a new line, so the box isn't overfull anymore?

I tried setting \tolerance=10000 but that gives this strange breaking point:

with tolerance

3
  • Without hyphenation there are too few breakpoints for acceptable line breaks. Therefore I would switch to \raggedright. Sep 18, 2013 at 5:53
  • Good point and I will do that. And your comment made me thinking about what an "acceptable" line break is and it came to my mind that I have to set a high \emergencystretch to make the point before "Struktogramme" acceptable. You should make an answer from that.
    – AndreKR
    Sep 18, 2013 at 5:59
  • A high \emergencystretch indeed looks unacceptable to my eyes. ;)
    – AndreKR
    Sep 18, 2013 at 6:01

1 Answer 1

5

Because of the language setting \language=\nohyphens hyphenation is disabled. Then there are too few breakpoints for acceptable line breaks (and especially with a language that has long words).

As you have found \emergencystretch would help, but the costs are unacceptable large gaps between words.

Therefore it makes sense to switch from full justification to flush left by using \raggedright.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .