I am using Biblatex and Babel.
I am trying to print a translated conjunction for \parencite
, \cite
and \textcite
depending on the language I provide with langid
. For reasons too long to explain, I can't define a specific style=
for the biblatex package.
This is the document which I'm testing on:
\documentclass{article}
\usepackage[letterpaper,margin=2cm]{geometry}
\usepackage{lipsum}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\usepackage[english, main=italian, german]{babel}
\selectlanguage{italian}
\usepackage[autostyle]{csquotes}
\setquotestyle{english}
\usepackage[backend=biber,
natbib=true,
citestyle=authoryear-icomp,
bibstyle=authoryear-icomp,
ibidpage=true,
dashed=true,
pagetracker=false,
maxbibnames=4,
maxcitenames=2,
autolang=other
]{biblatex}
\addbibresource{sample.bib}
\DeclareQuoteStyle{english}%
{\textquotedblleft}
[\textquotedblleft]
{\textquotedblright}
[0.05em]
{\textquoteleft}
[\textquoteleft]
{\textquoteright}
\DeclareQuoteStyle{german}%
{\textquotedblleft}
[\textquotedblleft]
{\textquotedblright}
[0.05em]
{\textquoteleft}
[\textquoteleft]
{\textquoteright}
\DeclareQuoteStyle{italian}%
{\textquotedblleft}
[\textquotedblleft]
{\textquotedblright}
[0.05em]
{\textquoteleft}
[\textquoteleft]
{\textquoteright}
\begin{document}
\section{Tutorial LaTeX}
\lipsum[1-4]
\parencite{greenwade93} \cite{greenwade93} \textcite{greenwade93}
\parencite{gurlami1943} \cite{gurlami1943} \textcite{gurlami1943}
\parencite{landa1943} \cite{landa1943} \textcite{landa1943}
\printbibliography[heading=bibintoc, title={Bibliografia}]
\nocite{*}
\end{document}
Considering these three bib-entries, whose language I have clearly differentiated ...
@article{greenwade93,
author = "George Greenwade and Bob Jordan",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342-351",
langid = "english",
}
@article{gurlami1943,
author = "Enzo Gurlami and Dominic DeCocco",
title = "How to sneak into parties",
year = "1943",
journal = "Scalps",
volume = "14",
number = "3",
pages = "342-351",
langid = "italian",
}
@article{landa1943,
author = "Hans Landa and King Schultz",
title = "How to be an actor",
year = "1943",
journal = "The Hateful Eight",
volume = "14",
number = "3",
pages = "100-3901",
langid = "german",
}
... the result is the same -- the conjunction used is always the italian one "e":
If I try fixing the problem by myself, the result is disgusting and every conjunction is added*, regardless of the language defined (*even in the bibliography, which is something I don't need). What am I doing wrong?
\DeclareDelimFormat{finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\iffieldannotation{langid}{english}{\addspace\printtext{and}\space}{}%
\iffieldannotation{langid}{italian}{\addspace\printtext{e}\space}{}%
\iffieldannotation{langid}{german}{\addspace\printtext{und}\space}{}%
}