[XeTeX] alternate text for line-breaking

Arthur Reutenauer arthur.reutenauer at normalesup.org
Fri Jan 14 21:32:50 CET 2011


> I feel your pain, but someone should say it out loud: what you want is  
> not possible in general.

  Indeed, thanks for volunteering :-)

>                          \discretionary is not powerful enough, since it  
> can only break one word in two, nothing else.

  Right.  \discretionary acts on hyphenation, which is only a part of
the general line-breaking problem.  And that problem is hard enough as
it is.

>        I am no expert on those newfangled TeX variants involving some  
> other (less ideosyncratic) programming languages, but I venture the  
> guess that my statement is valid also for them; someone please correct  
> me if I'm wrong.

  If you mean LuaTeX, then it's definitely possible there, although the
naïve implementation (just try all the possible alternatives) is subject
to combinatorial explosion -- precisely what Knuth succeeded in avoiding
by devising TeX's current line-breaking algorithm.

	Arthur


More information about the XeTeX mailing list