[XeTeX] Hyphenating words with apostrophes in French

Jonathan Kew jonathan at jfkew.plus.com
Mon Nov 17 15:39:05 CET 2008


On 17 Nov 2008, at 14:06, Manuel Pégourié-Gonnard wrote:

> Hi,
>
> (X-posting on the XeTeX and hyphenation mailing lists)
>
> I'm under the impression that words following an apostrophe cannot be
> hyphenated in French using XeLaTeX, xltxtra and babel with appropriate
> hyphenation patterns. In the following example, hyphenation is correct
> using pdftex, but under XeTeX the first paragraph has an overfull  
> \hbox.

You're right, this is a problem. The reason is that the Unicode right- 
single-quote (or apostrophe) character U+2019 has not been given a non- 
zero \lccode, and therefore it is considered a nonletter by the  
hyphenation routine.

If you put

   \lccode"2019="2019

into your document, you should get the hyphenation you expect.

I'm not sure whether this should be built into the xe(la)tex format,  
controlled by babel or polyglossia depending on the language in use,  
or what.... suggestions are welcome.

JK

>
>
> \documentclass[a4paper]{article}
> \usepackage{ifxetex}
> \ifxetex
>  \usepackage{xltxtra}
> \else
>  \usepackage[utf8]{inputenc}
>  \usepackage[T1]{fontenc}
>  \usepackage{textcomp}
>  \usepackage{lmodern}
>  \usepackage{fixltx2e}
> \fi
> \usepackage[british, frenchb]{babel}
>
> \begin{document}
> Une ligne avec du texte \mbox{pour remplir la ligne un peu : les
> coupures} n'apparaissent \mbox{pas toujours correctement}.\par
> Une ligne avec du texte \mbox{pour remplir la ligne un peu : les
> coupures} apparaissent \mbox{pas toujours correctement}.
> \end{document}
>
> Am I doing something wrong? Is this a known problem?
>
> Thanks,
> Manuel.
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex



More information about the XeTeX mailing list