[XeTeX] no hyphenation with fontspec
Pablo Rodríguez
oinos at web.de
Thu Dec 21 18:45:05 CET 2006
Jonathan Kew wrote:
> On 21 Dec 2006, at 4:24 pm, Pablo Rodríguez wrote:
>
>> I wanted to show
>> a missing hyphenation on a document of mine, such as:
>> [...]
>>
> If you change "d’Aristote" to "d'Aristote" (look carefully: I've
> replaced your curly apostrophe U+2019 with a straight ASCII one U
> +0027), then you'll find that a hyphen position is found. The reason
> is that the patterns are written for legacy TeX-encoded text, using
> the ASCII apostrophe, and there is no similar pattern with U+2019.
>
> I suppose we could look at patching the French patterns to deal with
> this, but I'm trying to avoid maintaining separate pattern files for
> xetex; I'd rather see the "master" pattern files extended and
> organized better.
>
> As a workaround, you can add a line in your preamble:
>
> \lccode`\’=`\'
>
> or if you want to make it more explicit:
>
> \lccode"2019="27
>
> This will cause the curly apostrophe to be treated the same as the
> straight ASCII one for the purposes of hyphenation, so xetex will
> find the expected break. (Provided you don't use something else that
> overrides this code.)
Thanks, it works fine.
Now I have another issue, I need to hyphenate Frommann--Holzboog the
same way as Frommann---Holzboog.
Adding \lccode"2013="2014 at the beginning of the document does the job,
but if u+2013 happens to be the last character before the line end,
xetex adds a hyphen and the word will be hyphenated "Frommann–- Holzboog".
How could I avoid the insertion of the hyphen?
Thanks again for your help,
Pablo
More information about the XeTeX
mailing list