Missing space after "guillemets"
If you want to get the correct spacing between \fg
and a word following it, you have to add an empty statement {}
after it.
This because the definition of \fg
in frenchb.ldf
resorts to the definition of \FB@fg
which is
\DeclareRobustCommand*{\FB@fg}{\ifdim\lastskip>\z@\unskip\fi
\FBguill@spacing\guillemotright\xspace}
As you can see, this command takes no arguments, so it inserts no space after it, if you don't break the command explicitly with {}
(or \
which is not advisable).
The behavior is the same as if you define a new command with no arguments
\newcommand{\qqq}{qqq}
and use it as
\qqq word
\documentclass[11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\begin{document}
Lalala \og blabla \fg{} lalala.
\end{document}
You can also notice that the definition of \FB@fg
contains an \xspace
at its end. This means that, if you don't want to insert {}
each time you use \fg
, you can simply load the package xspace
.
The following MWE gives the same result as in the above picture:
\documentclass[11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{xspace}
\begin{document}
Lalala \og blabla \fg lalala.
\end{document}
For some reason beyond my understanding, using the keyboard guillemets «
and »
together with the following option in the babel
package
\frenchbsetup{og=«,fg=»}
solves the problem (and elegantly too). Of course, one needs access to utf8 characters. Here is a full example.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\frenchbsetup{og=«,fg=»}
\begin{document}
Ceci est du «texte» entre guillemets.
\end{document}
(source: univ-mlv.fr)