[XeTeX] hyphenating words with hyphen
John Was
john.was at ntlworld.com
Tue Oct 6 08:40:27 CEST 2009
Hello Vadim
In case it's relevant, in English-language typography it is considered very
bad to hyphenate an expression which is already hyphenated. TeX will (I
think) always prohibit this by default, and where it is absolutely
unavoidable the user needs to put an explicit hyphen \- in the file. But
rewriting where possible to avoid the situation would be a better solution.
This is why typesetters dislike expressions such as 'the
do-it-later-if-at-all attitude to work' or 'an ethnic-community-oriented
strategy' (the second, with longer words, is more awkward than the first as
there is a greater chance that you would need to divide one of the
components).
Best
John
----- Original Message -----
From: "Vadim Radionov" <vadim.radionov at gmail.com>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Tuesday, October 06, 2009 12:11 AM
Subject: [XeTeX] hyphenating words with hyphen
> Dear all,
>
> I'm missing this important detail in the manuals: what is the natural
> way to get words with hyphen hyphenated in other places than that
> hyphen?
>
> I tried
>
> \XeTeXinterchartokenstate 1
>
> \XeTeXcharclass `\- 150
> \XeTeXinterchartoks 150 0 = {\nobreak\hskip0pt}
> \XeTeXinterchartoks 0 150 = {\hskip0pt}
>
> and it works almost well -- except for, surprisingly, allowing a break
> *before* the hyphen.
>
> Thank you in advance,
>
> Vadim
>
More information about the XeTeX
mailing list