[XeTeX] alternate text for line-breaking
Philip Taylor (Webmaster, Ret'd)
P.Taylor at Rhul.Ac.Uk
Thu Jan 13 19:48:19 CET 2011
Have a look at TeX's \discretionary, Bogdan : this
may give you some ideas.
Philip Taylor
--------
Bogdan Butnaru wrote:
> I was wondering if is it possible to do write a LaTeX command that
> provides text alternatives when the line-breaking algorithm can’t find
> good line breaks. For example, a command that for:
>
> Pretext \alternate{something}{a thing} post-text.
>
> runs the line-breaking algorithm for “Pretext something post-text.”
> but if gets bad results (i.e., if it would report
> an underful or overful hbox) tries again with “Pretext a thing
> post-text.”
More information about the XeTeX
mailing list