csquotes
csquotes copied to clipboard
Babel-french’s "og=«, fg=»" creates wrong space for "«" in bibliography
Hello,
It seems this configuration (MWE) :
\documentclass{article}
\usepackage[main=french]{babel}
\frenchsetup{og=«, fg=»} % Remove these options then no problem!
\usepackage[autostyle]{csquotes}
\begin{document}
This « kind » of space. % Good
This «kind» of space. % Good
This \enquote{kind} of space. % Bad
\end{document}
creates a wrong (longer) space, like This « kind » of space
.
It is explained in the French version of Babel-french manual; I added myself the last sentence to the shorter English one (link):
og=«, fg=»; when guillemets characters are available on the keyboard (through a compose key for instance), it is nice to use them instead of typing \og and \fg. This option tells babel-french which characters are opening and closing French guillemets (they depend on the input encoding), then you can type either « guillemets » or «guillemets» (with or without spaces) to get properly typeset French quotes. On the other hand, if you enable this option, you should not explicitly code unbreakable spaces:
«~quotes~»
would produce« quotes »
where the space following the opening quote is too large.
It seems we are exactly in the described case.
If I remove the og=«, fg=»
options, it works well, but I enable it because I have the characters directly on my keyboard (as well as thin and non-breaking spaces).
Don’t hesitate to tell me if it is already known and that I missed a compatibility option somewhere…
Sincerely.
For the moment, I solved this issue with:
\makeatletter
\renewcommand*{\@frenchquotespace}{}
\makeatother
It seems it lets Babel-french automatically manage the insertion of non-breaking space.
Isn't this a question of picking one or the other method?
With og=«, fg=»
, we can use directly these characters, and the good spaces will be added automatically, but inside bibliography, these characters are automatically added by csquotes, as well as an additional space after the «, so that we have an incompatibility.
My MWE is not ideal because this problem shows up in bibliography (or other environments in which we cannot really type everything).
I'm not seeing a good fix here: it really is an either-or.
I didn't see this issue before and discovered it by myself (BTW, it isn't an issue with pdflatex
). I reported it to Daniel Flipo who provides the fix:
\DeclareQuoteStyle[quotes]{french}
{\og}
{\fg}
{\textquotedblleft}
{\textquotedblright}
as shown by the following MWE:
\documentclass{article}
\usepackage[main=french]{babel}
\frenchsetup{og=«, fg=»} % Remove these options then no problem!
\usepackage[autostyle]{csquotes}
\DeclareQuoteStyle[quotes]{french}
{\og}
{\fg}
{\textquotedblleft}
{\textquotedblright}
\begin{document}
This « kind » of space. % Good
This «kind» of space. % Good
This \enquote{kind} of space. % Good as well
\end{document}
Would be nice if this setting could be implemented in csquotes
.