[texhax] Disable hyphenation after - everywhere

Aleksandar Zec zealeksanman at gmail.com
Sun Sep 3 00:01:57 CEST 2017


On 2 September 2017 at 21:23, Ulrike Fischer <news3 at nililand.de> wrote:
> Imho the only general and reliable working way is to use a command
> like \babelhyphen{nobreak}:
>
> antidisestablish\babelhyphen{nobreak}mentarianism

Perfect! This command absolutely skipped from attention, since my
current project is done with polyglossia. Fortunately, polyglossia
includes a copy of relevant babel code.

There is yet another brutal luatex soluton that just crossed my mind:
in a pre_linebreak_filter, we parse all glyphs nodes, and if it's "-"
and followed by a node.id("dics"), we simple remove that next node. It
works.

Just out of curiosity, can you think of any disadvantage of this luatex method?

Thanks a lot,
Alex.


More information about the texhax mailing list