I would like a (biblatex) bibliography where:
- The language of the bibliography is always the same, regardless of the language of the entry. I do not want translation or localization of things like: page or volume number, translator or editor data, author's name layout…
- The title of the entries follow the punctuation spacing rules of the language of the entry. Typically: no space before ? in english, unbreakable space before ? in french.
I've tested various combinations of language
and autolang
parameters for biblatex, whitout success so far.
For example in the MWE below:
autolang=other
- correct punctuation spacing to switch punctuation rules, following the
langid
of each entry. - unwanted localization like: "Trans. by"/"Trad. par", "p."/"pp.", small capital or not for the name of the author…
- correct punctuation spacing to switch punctuation rules, following the
autolang=hyphen
- correct single language for the bibliography ("Trad. par" in both cases)
- incorrect typography: the space before ? is missing in french.
\documentclass{article}
\usepackage[english,french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{filecontents}
\begin{filecontents}{biblio.bib}
@book{compagnon,
author = {Compagnon, Antoine},
translator = {Même, Moi},
date = {1998},
title = {Titre: aléatoire?},
pages = {306-723},
langid = {french},
}
@book{glashow,
author = {Glashow, Sheldon},
title = {Random: title?},
translator = {Self, My},
date = {1961},
pages = {579-588},
langid = {english},
}
\end{filecontents}
\usepackage[backend=biber,
style=verbose-trad2,
singletitle=true,
autolang=other,
]{biblatex}
\addbibresource{biblio.bib}
\begin{document}
\footcite{compagnon}
\footcite{glashow}
\printbibliography
\end{document}
Potential close questions:
- Adding
\foreignlanguage{...}
in the title field is often suggested. I can't find again a very didactic post from user moewe explaining that biblatex does not have a per-field language options and presenting distinct strategies. - Correct punctuation, but with unwanted localisation at the entry level.
- Correct hyphenation, but not the punctuation rules.
- Potential solution in lualatex? Not sure to understand why it should be different.
Best Answer
As discussed in https://github.com/plk/biblatex/issues/757 and Change language on a per field basis, part 2: Fonts, case transformation and sorting this is pretty tricky and would ideally be addressed in the
biblatex
core. But that needs a lot of groundwork that still is being worked on.Here is a
babel
version of thepolyglossia
-based answer to Change language on a per field basis, part 2: Fonts, case transformation and sorting that should get you a little further.As discussed in the comments, this approach has some shortcomings, because it is not always desirable to have the language switching code applied to the field contents directly.
I cannot offer a good alternative approach, since changing the language after field formats etc. have been applied effects bibstrings (which are supposed to stay the same). What I can offer is an ad-hoc solution that allows you to exempt certain fields from the language switching (you can of course reverse the logic to have language switching only for certain fields if that works better for you).