[XeTeX] From LaTeX to XeLaTeX

Manuel Pégourié-Gonnard manuel.pg at free.fr
Fri Feb 1 01:08:42 CET 2008


Hi,

Charles de Miramon a écrit :
> 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. Even
> with the latest version of frenchb it did not work. 
> 
How did you try ? As far as I know, there is three correct ways to use french
quotes with frenchb :

1. Type \og blah \fg{}, without any non-breakable space. (Even the {} after
\fg is unnecessary if you use xspace (and if it works).)
2. Type «~blah~».
3. Type « blah » with normal spaces, using \frenchbsetup{og=«, fg=»} in your
preamble (needs the version *2.0* of frenchb.ldf).

Looks like the three versions work with XeTeX, from my tests. By the way, I
don't like the ~ way very much, since it is less nice to type, and it doesn't
let frenchb adjust the spacing exactly the way it wants to. One can see the
(little) difference on the example below.

> I was on a deadline and could not investigate further. Manuel, if you could
> test that feature and report and the list, it would be nice.
> 
Well, I used the following sample file. If you comment out the \frenchbsetup
line, you can see the line breaking isn't correct. If you keep the
\frenchbsetup line, or if you replace « français » with «~français~» or \og
français\fg{}, the line are correctly broken.

By the way, I just discovered that the unbreakable space character has
\catcode 12. Looks strange to me, but maybe a separate thread would be a
better place to discuss this.


Manuel.

% test file:
\documentclass{article}
\usepackage{xltxtra}
\usepackage[frenchb]{babel}
\frenchbsetup{og=«, fg=»}

\begin{document}
\begin{minipage}{5.0cm}
  On voit ici que les guillemets « français » saisis au clavier sans
  espace insécable à l'intérieur sont bien gérés par frenchb2.
\end{minipage}
\end{document}
% end test file


More information about the XeTeX mailing list