[XeTeX] From LaTeX to XeLaTeX

Jonathan Kew jonathan_kew at sil.org
Thu Jan 31 23:58:16 CET 2008


On 31 Jan 2008, at 2:23 pm, Charles de Miramon wrote:

> Will Robertson wrote:
>
>> ; babel works so
>> some extent -- I haven't done much testing but fontspec tries to do
>> the right thing for the languages that try to change the font  
>> encoding.
>
> Last week, I tried to convert a big French LaTeX article to XeTeX  
> and I had
> problems with the French quotes « ». In French typography, there  
> should be
> an unbreakable space between the quote and the first letter inside.

How are the « » written in the source document? If they're literal «  
and » characters, with normal spaces after/before them, it should be  
possible to make those spaces unbreakable with a little macro  
definition:

   \catcode`\«=\active
   \def«{\char`\«\nobreak}
   \catcode`\»=\active
   \def»{\skip0=\lastskip \unskip
     \nobreak \hskip\skip0 \char`\»}

(Untested code, just intended to give an idea.... I don't suppose  
this would be robust in all situations without some further work.)

JK



More information about the XeTeX mailing list