[Tex/LaTex] Punctuation in bibliography with multiple languages

babelbiblatexbibliographieslanguagespunctuation

In a document written in a given language (in my case French but it may not matter so much) I have a bibliography mixing entries in different languages (in this case French, English and German). I would like to get the punctuation (basically quotation marks and spacing before double punctuation or question marks) right for each entry.

In this simple example:

\documentclass{article}

\usepackage[british,french]{babel}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{A2012,
author = {Author, A},
title = {A ``paper'': written in english?},
journal = {Journal},
year = {2012},
volume = {2},
pages = {70--76},
}
@article{B2012,
author = {Auteur, B},
title = {Un \og article\fg : \'ecrit en fran\c{c}ais ?},
journal = {Journal},
year = {2012},
volume = {2},
pages = {77--79},
}
\end{filecontents}

\begin{document}

\cite{A2012}, \cite{B2012}

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}

I obtain

enter image description here

babel has added spacing before the colon and question mark for the english entry. One way to avoid that is to add \NoAutoSpaceBeforeFDP in the preamble. But then the space before the colon is eaten up by babel also in the french entry. I can make sure this does not happen by putting manually an unbreakable space in
the bibliographic entry. However, this seems like an inconvenient hack to me.

Is there a systematic way to make sure that the spacing is correct in each entry? (and if possible, to obtain the correct quotation marks without entering them manually as I have done in the example?)

Best Answer

This is yet another reason to switch to biblatex (here: in combination with csquotes). (And with biblatex-trad there's even a trad-plain style!)

\documentclass{article}

\usepackage[british,french]{babel}
\usepackage[french=guillemets]{csquotes}
\usepackage[style=trad-plain,babel=other]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{A2012,
hyphenation = {british},
author = {Author, A},
title = {A \enquote{paper}: written in english?},
journal = {Journal},
year = {2012},
volume = {2},
pages = {70--76},
}
@article{B2012,
hyphenation = {french},
author = {Auteur, B},
title = {Un \enquote{article}: \'ecrit en fran\c{c}ais?},
journal = {Journal},
year = {2012},
volume = {2},
pages = {77--79},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\cite{A2012}, \cite{B2012}

\printbibliography

\end{document}

enter image description here