1

I need to change \footcites/\cites in the way that the last delimiter (\multicitedelim) between the last and second last argument is an "und" (\bibstring{and}) instead of a semicolon. I know that this works for \textcites.

Here is my minimal working example:

\documentclass[a4paper,12pt,twoside]{report}

\usepackage[ngerman]{babel}

\usepackage[backend=biber,
                        style=authoryear-ibid,
                        ibidtracker=context,
                        natbib=true]
                     {biblatex}     

\usepackage[babel,german=quotes]{csquotes}

\parindent 0pt

\usepackage{filecontents}

\begin{filecontents}{literatur.bib}
@book{Faulstich.1994,
 year = {1994},
 title = {Grundwissen Medien},
 address = {M{\"u}nchen},
 publisher = {Fink},
 editor = {Faulstich, Werner}
}


@book{Faulstich.2002,
 author = {Faulstich, Werner},
 year = {2002},
 title = {Einf{\"u}hrung in die Medienwissenschaft},
 address = {M{\"u}nchen},
 publisher = {Fink},
 subtitle = {Probleme -- Methoden -- Dom{\"a}nen}
}


@book{Faulstich.2004,
 year = {2004},
 title = {Grundwissen Medien},
 address = {M{\"u}nchen},
 publisher = {Fink},
 editor = {Faulstich, Werner}
}
\end{filecontents}

\addbibresource{literatur.bib}

\begin{document}

\textbf{Using textcites:}\\
\textcites{Faulstich.1994}{Faulstich.2002}{Faulstich.2004}\\
\textbf{Current (cites):}\\
\cites{Faulstich.1994}{Faulstich.2002}{Faulstich.2004}\\
\textbf{Objective (cites):}\\
Faulstich, 1994; Faulstich, 2002 und Faulstich, 2004\\
\textbf{Current (footcites)}\footcites{Faulstich.1994}{Faulstich.2002}{Faulstich.2004}\\
\textbf{Objective (footcites)}\footnote{Faulstich, 1994; Faulstich, 2002 und Faulstich, 2004.}

\end{document}

Using \footcites or \cites I get:

Faulstich, 1994; Faulstich, 2002; Faulstich, 2004.

But I need to get:

Faulstich, 1994; Faulstich, 2002 und Faulstich, 2004.

I have tried two solutions from this forum but both won't work in my case although I updated all my packages before testing. The related posts are:

“And” between last and second last cite using the \footcites command and authoryear-icomp

Separation between last and secondlast item in citet with authoryear style?

Is there any other possibility to make \multicitedelim act in the way I need it?

0

This is quite tricky without deeper changes to either the citation macros or biblatex internals. See also the very related question Biblatex change punctuation between authors in multiple citations.

The \textcite commands are special beasts and their punctuation setup is subtly different from the setup of the other citation commands, which means that it is easy for them to check if one is at the last cite key in a list. It would be possible to redefine the other citation commands in a similar fashion, but that would require tedious redefinitions.

The main issue here is that with other citation commands the \multicitedelim between two cite keys X and Y is processed with the information found in X. So we need to check if we are the second-to-last citation. \textcite instead processes \textcitedelim with the info of Y and thus needs to check if we are in the last place. The interplay of citetotal (the number of keys in \cite{sigfridsson,worman,geer}) and multicitetotal (the number of groups in \cites{sigfridsson}{worman,geer}) and their internal implementation means that it is possible to check if we are at the last key overall (i.e. w.r.t. both citetotal and multicitetotal), but that it is not possible to check if we are at the second-to-last key overall. (We could check if we are at the second-to-last key w.r.t. citetotal or multicitetotal, but it would always be possible to construct a case where the detection would fail to determine the second-to-last entry.) The issue is basically that we are missing an 'overallcitecount/overallcitetotal'. See also https://tex.stackexchange.com/a/483189/35864 and discussions in the comments as well as Phelype Oleinik's work linked in https://gist.github.com/moewew/df9eb6e4f730350084b9a3fb371621a9 (which I should probably have a look at soon-ishly).

Secondly (and not that importantly in this specific case), the \textcite commands are often implemented in a two-pass fashion, which means that they process the list of cite keys twice. That allows them to collect important information about the list of cite keys and can help the commands decide where to put the "and" for -comp styles.

If you always use \cites if you cite multiple keys and always place each key in a separate group, then the following should work.

\documentclass[a4paper,12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[autostyle, german=quotes]{csquotes}
\usepackage[backend=biber,
            style=authoryear-ibid,
            ibidtracker=context,
            natbib=true]{biblatex}     

% the name \iffinalcitedelim is already taken by the
% textcite-specific test :-(
% This might need to be adapted to the style,
% the definition here was tested with authoryear-ibid
% and should work for most non-comp styles
% but ONLY IF you only ever use the multi-cite commands
% and give each key a group of its own
% when you cite multiple works.
\newcommand*{\iffinalmulticitedelim}{%
  \ifnumequal{\value{multicitecount}}{\value{multicitetotal}-1}
}

\renewcommand*{\multicitedelim}{%
  \iffinalmulticitedelim
    {\addspace\bibstring{and}}
    {\addsemicolon}%
  \space}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Faulstich.1994,
 year      = {1994},
 title     = {Grundwissen Medien},
 address   = {München},
 publisher = {Fink},
 editor    = {Faulstich, Werner}
}
@book{Faulstich.2002,
 author    = {Faulstich, Werner},
 year      = {2002},
 title     = {Einführung in die Medienwissenschaft},
 address   = {München},
 publisher = {Fink},
 subtitle  = {Probleme -- Methoden -- Domänen}
}
@book{Faulstich.2004,
 year      = {2004},
 title     = {Grundwissen Medien},
 address   = {München},
 publisher = {Fink},
 editor    = {Faulstich, Werner}
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
\textbf{Using textcites:}
\textcites{Faulstich.1994}{Faulstich.2002}{Faulstich.2004}

\textbf{Current (cites):}
\cites{Faulstich.1994}{Faulstich.2002}{Faulstich.2004}

\textbf{Objective (cites):}
Faulstich, 1994; Faulstich, 2002 und Faulstich, 2004

\textbf{Current (footcites)}\footcites{Faulstich.1994}{Faulstich.2002}{Faulstich.2004}

\textbf{Objective (footcites)}\footnote{Faulstich, 1994; Faulstich, 2002 und Faulstich, 2004.}
\end{document}

 Faulstich, 1994; Faulstich, 2002 und Faulstich, 2004

  • Thanks a lot for the detailed response. I checked the coding in my MWE and my full document as well and everything works out fine. This will help me a lot writing my thesis. Thanks! – Felix May 19 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.