[XeTeX] polyglossia and french

Alan Munn amunn at gmx.com
Sat Sep 24 22:55:44 CEST 2011


On Sep 24, 2011, at 3:34 PM, rhino64 at postmail.ch wrote:

> Hi All,
>    When typesetting documents in french with polyglossia,
> a space is added before double punctuation signs (like !:?...).
> 
> This is normal in french typography used in France. However,
> here in Switzerland, it is more usual to not use this
> extra space.
> 
> For the Babel package, I have written few "shorthands" to remove
> the unwanted space. Since such trick is no more available
> in polyglossia, what is the best solution to remove
> this extra space while keeping the others features related to 
> the french language.

The French punctuation spacing is implemented in Polyglossia via XeTeX's interchartoks facility. It is defined in /usr/local/texlive/2011/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf (on a TeXLive distribution)

There's a command \nofrench at punctuation which turns off all the French related punctuation.  It is defined as follows:

\def\nofrench at punctuation{%
    \lccode"2019=\z@
    \XeTeXcharclass `\! \z@
    \XeTeXcharclass `\? \z@
    \XeTeXcharclass `\‼ \z@
    \XeTeXcharclass `\⁇ \z@
    \XeTeXcharclass `\⁈ \z@
    \XeTeXcharclass `\⁉ \z@
    \XeTeXcharclass `\; \z@
    \XeTeXcharclass `\: \z@
    \XeTeXcharclass `\« \z@
    \XeTeXcharclass `\» \z@
    \XeTeXcharclass `\‹ \z@
    \XeTeXcharclass `\› \z@
    \XeTeXinterchartokenstate=0
    }

So to selectively turn off the special spacing for particular characters, redefine this command by commenting out the lines that correspond to spacing that you wish to keep, and then issue the command to turn of the uncommented ones.

If you're doing this in the preamble of your document, make sure the code is surrounded by \makeatletter and \makeatother.


Alan

-- 
Alan Munn
amunn at gmx.com







More information about the XeTeX mailing list