Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel-french’s "og=«, fg=»" creates wrong space for "«" in bibliography #48

Open
BenjaminGalliot opened this issue Dec 7, 2020 · 5 comments

Comments

@BenjaminGalliot
Copy link

BenjaminGalliot commented Dec 7, 2020

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.

@BenjaminGalliot BenjaminGalliot changed the title Babel-french’s "og=«, fg=»" creates wrong space for « in references Babel-french’s "og=«, fg=»" creates wrong space for "«" Dec 7, 2020
@BenjaminGalliot
Copy link
Author

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.

@josephwright
Copy link
Owner

Isn't this a question of picking one or the other method?

@BenjaminGalliot
Copy link
Author

BenjaminGalliot commented Dec 9, 2020

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).

@BenjaminGalliot BenjaminGalliot changed the title Babel-french’s "og=«, fg=»" creates wrong space for "«" Babel-french’s "og=«, fg=»" creates wrong space for "«" in bibliography Dec 9, 2020
@josephwright
Copy link
Owner

I'm not seeing a good fix here: it really is an either-or.

@dbitouze
Copy link

dbitouze commented Mar 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants