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

  • Without hyphenation there are too few breakpoints for acceptable line breaks. Therefore I would switch to \raggedright. – Heiko Oberdiek Sep 18 '13 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 '13 at 5:59
  • A high \emergencystretch indeed looks unacceptable to my eyes. ;) – AndreKR Sep 18 '13 at 6:01
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.