[XeTeX] no hyphenation with fontspec
Jonathan Kew
jonathan_kew at sil.org
Fri Dec 22 00:33:07 CET 2006
On 21 Dec 2006, at 10:38 pm, Pablo Rodríguez wrote:
> Jonathan Kew wrote:
>> You mean where there's a (Unicode) en-dash or em-dash? (Either in the
>> original input text, or as a result of a font mapping.)
>>
>> If so, you may want to set the parameter
>>
>> \XeTeXdashbreakstate = 1
>>
>> I'm not sure if either of the parts of the compound word will be
>> eligible for hyphenation in this situation; normally, if there's an
>> explicit hyphen/dash, TeX does not attempt to further hyphenate the
>> two parts. If you want to allow that, you probably need some
>> additional code to introduce some (possibly zero-width) glue.
>
> It worked the way you said.
>
> I want to further hyphenate the two parts with explicit en/em dashes
> (not with explicit hyphens).
>
> How should I include the glue into my code to do this? (I have no idea
> of how this should be implemented.)
At the most "primitive" level, you could enter
Frommann\hskip0pt--\hskip0pt Holzboog
in your document, but of course that gets tedious and error-prone.
With
\newcommand\allowhyph{\hskip0pt }
you could say
Frommann\allowhyph--\allowhyph Holzboog
instead, which is marginally nicer.
Better still, though, would be to define a \dash command that
includes the glue you want, and use that in the text:
\newcommand\dash{\hskip0pt--\hskip0pt }
Frommann\dash Holzboog
HTH,
JK
More information about the XeTeX
mailing list