What is the most elegant way to cite two things connected by a 'joining word' with biblatex?
One solution is to use a multicite approach and redefine the \multicitedelim
appropriately following “And” between last and second last cite using the \footcites command and authoryear-icomp.
\newcommand{\interp}[1]{%
\renewcommand*{\multicitedelim}{%
\ifnumequal{\value{multicitecount}}{\value{multicitetotal}}
{\addcomma\space\printtext{#1}}
{}%
\space}%
\renewcommand*{\textcitedelim}{%
\ifnumequal{\value{multicitecount}}{\value{multicitetotal}}
{\addspace\printtext{#1}}
{}%
\space}%
}
We then simply define new multicitecommands
\DeclareMultiCiteCommand{\citeint}[\interp{interpreting}]{\cite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\citesla}[\interp{slagging off}]{\cite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\citepint}[\interp{interpreting}\mkbibparens]{\parencite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\citepsla}[\interp{slagging off}\mkbibparens]{\parencite}{\setunit{\multicitedelim}}
\makeatletter
\DeclareMultiCiteCommand{\citetint}[\interp{interpreting}\cbx@textcites@init\cbx@textcites]{\textcite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\citetsla}[\interp{slagging off}\cbx@textcites@init\cbx@textcites]{\textcite}{\setunit{\multicitedelim}}
\makeatother
Which we can then use as
\citeint{ctan}{gillies} and \citesla{ctan}{gillies}
You can also use your initial idea of \parencites{ctan}[interpreting][]{gillies}
if you issue a
\AtNextCite{\renewcommand{\multicitedelim}{\addcomma\space}}
before the citation command.
As in
\AtNextCite{\renewcommand{\multicitedelim}{\addcomma\space}}
\parencites{ctan}[interpreting][]{gillies}
\documentclass{article}
\usepackage[citestyle=authoryear-comp,bibstyle=authoryear,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\newcommand{\interp}[1]{%
\renewcommand*{\multicitedelim}{%
\ifnumequal{\value{multicitecount}}{\value{multicitetotal}}
{\addcomma\space\printtext{#1}}
{}%
\space}%
\renewcommand*{\textcitedelim}{%
\ifnumequal{\value{multicitecount}}{\value{multicitetotal}}
{\addspace\printtext{#1}}
{}%
\space}%
}
\DeclareMultiCiteCommand{\citeint}[\interp{interpreting}]{\cite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\citesla}[\interp{slagging off}]{\cite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\citepint}[\interp{interpreting}\mkbibparens]{\parencite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\citepsla}[\interp{slagging off}\mkbibparens]{\parencite}{\setunit{\multicitedelim}}
\makeatletter
\DeclareMultiCiteCommand{\citetint}[\interp{interpreting}\cbx@textcites@init\cbx@textcites]{\textcite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\citetsla}[\interp{slagging off}\cbx@textcites@init\cbx@textcites]{\textcite}{\setunit{\multicitedelim}}
\makeatother
\begin{document}
Desired output is (CTAN 2006, interpreting Gillies 1933).
\autocites{ctan}{gillies}
\citepint{ctan}{gillies} and \citepsla{ctan}{gillies}
\citetint{ctan}{gillies} and \citetsla{ctan}{gillies}
\citeint{ctan}{gillies} and \citesla{ctan}{gillies}
\autocites{ctan}{gillies}
\end{document}
EDIT
Or... er... this gets me the same output as shown below with the same document content:
\newbibmacro*{connectcites:multipostnote}{%
\setunit{\addcomma\space}%
\iffieldundef{multipostnote}
{\printtext{quoting}}
{\printfield{multipostnote}\clearfield{multipostnote}}%
\space}
\DeclareMultiCiteCommand{\pconnectcites}[\mkbibparens]{\parencite}{\usebibmacro{connectcites:multipostnote}}
But it probably violates the Biblatex Bible in a hundred different ways....
MWE:
\documentclass{article}
\usepackage[citestyle=authoryear-comp,bibstyle=authoryear,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\newbibmacro*{connectcites:multipostnote}{%
\setunit{\addcomma\space}%
\iffieldundef{multipostnote}
{\printtext{quoting}}
{\printfield{multipostnote}\clearfield{multipostnote}}%
\space}
\DeclareMultiCiteCommand{\pconnectcites}[\mkbibparens]{\parencite}{\usebibmacro{connectcites:multipostnote}}
\begin{document}
\pconnectcites(interpreting){ctan}{gillies}
\pconnectcites[see][56]{ctan}[details from][47--89]{gillies}
\pconnectcites(interpreting)[based on][87]{ctan}[original argument in][32]{gillies}
\pconnectcites(interpreting)[98]{ctan}[67]{gillies}
\pconnectcites(interpreting)[see][]{ctan}[an earlier version in][]{gillies}
\end{document}
Original Answer
At moewe's request, I'm posting this as an 'answer' although I don't really consider it one since it is so very far from elegant!
Using penguinpreferred's suggestion and xparse
, I come up with this:
\NewDocumentCommand \pconnectcites { D() {quoting} o o m o o m }{%
\parentext{%
\IfNoValueTF{#3}{%
\IfNoValueTF{#2}{%
\cite{#4}%
}{%
\cite[#2]{#4}%
}%
}{%
\cite[#2][#3]{#4}%
}%
, #1 %
\IfNoValueTF{#6}{%
\IfNoValueTF{#5}{%
\cite{#7}%
}{%
\cite[#5]{#7}%
}%
}{%
\cite[#5][#6]{#7}%
}%
}%
}
which allows me to say:
\pconnectcites(interpreting){ctan}{gillies}
\pconnectcites[see][56]{ctan}[details from][47--89]{gillies}
\pconnectcites(interpreting)[based on][87]{ctan}[original argument in][32]{gillies}
\pconnectcites(interpreting)[98]{ctan}[67]{gillies}
\pconnectcites(interpreting)[see][]{ctan}[an earlier version in][]{gillies}
to produce: