1

When using XeLaTeX and babel "francais", I sometimes get weird spacing: e.g. \, makes a wider space than the regular space (see what happens on the second line here).

\documentclass[12pt,a4paper]{article}
\usepackage{xltxtra}
\usepackage[francais]{babel}
\usepackage[margin=3cm]{geometry}
\usepackage{hyperref}

\setromanfont[Mapping=tex-text,Numbers={OldStyle},Ligatures={Common},Contextuals=Alternate]{Garamond Premier Pro}

\newcommand{\teng}[1]{\emph{#1}}

\begin{document}
\noindent (par exemple Z3 de Microsoft ou Yices de SRI)\,; ce dernier donne une solution qui correspond à une trace d'exécution menant de la précondition à une des postconditions dont on désire déterminer l'accessibilité (par exemple, des conditions d'erreur comme la division par zéro).
\end{document}
3
  • 1
    Why do you use \, before ;? The babel option french/francais will already add space before ;. Jun 9, 2011 at 9:35
  • Note: the standard way of calling frenchb is \usepackage[french]{babel} instead of \usepackage[francais]{babel} afaik.
    – raphink
    Jun 9, 2011 at 9:37
  • 3
    That's what's supposed to happen: French babel already puts a space before the semicolon and you don't need to add manually one. Consider adopting polyglossia.
    – egreg
    Jun 9, 2011 at 9:43

1 Answer 1

2

frenchb (French for babel) adds non-secable normal spaces before ;. For this reason, your \, is added to the space already added by babel (or maybe even just ignored and replaced by a normal non-secable space).

If you wish to prevent frenchb from adding spaces before ;, you can do:

\shorthandoff{;}

after \begin{document} or

\AtBeginDocument{\shorthandoff{;}}

in your preamble.

1
  • 2
    \, adds a kern and the (active) semicolon "unskips", so the thin space \, is actually added to the space provided by ;, because \unskip doesn't do anything to kerns. However this space is not a normal interword space, but slightly smaller. A normal spaces is added in front of a colon.
    – egreg
    Jun 9, 2011 at 9:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .