[XeTeX] hyphenating words with hyphen

Fr. Michael Gilmary FrMichaelGilmary at MaroniteMonks.org
Tue Oct 6 01:39:52 CEST 2009


Vadim Radionov wrote:

> 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.
>   

This is from FAQ-nohyph.html found by using >> texdoc -s hyphen


    TeX won’t hyphenate a word that’s already been hyphenated. For
    example, the (caricature) English surname Smyth-Postlethwaite
    wouldn’t hyphenate, which could be troublesome. This is correct
    English typesetting style (it may not be correct for other
    languages), but if needs must, you can replace the hyphen in the
    name with a \hyph command, defined

    \def\hyph{-\penalty0\hskip0pt\relax}

    This is not the sort of thing this FAQ would ordinarily recommend...
    The hyphenat package defines a bundle of such commands (for
    introducing hyphenation points at various punctuation characters).



Hope that helps.


-- 
United in adoration of Jesus, 



fr. michael gilmary, mma

Most Holy Trinity Monastery
67 Dugway Road
Petersham, MA 01366-9725


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20091005/83ef3fc7/attachment.html>


More information about the XeTeX mailing list