2

I'm using the authoryear-comp style with biblatex. However, instead of being separated by a comma, I would like the years to be separated by and.

Right now,\footcitegives this result:

enter image description here

But I would like it took look something like this:

A and B 1995 and 1998.

I tried to \renewbibmacro but failed miserably.

\documentclass{article}
\usepackage{filecontents}
\usepackage[backend=biber,style=authoryear-comp]{biblatex}


\begin{filecontents}{\jobname.bib}
@article{a,
       author = {A and B},
       title = {Title},
       journal = {American Journal of Political Science},
       year = {1995},
       type = {Journal Article}
    }

@article{b,
       author = {A and B},
       title = {Title},
       journal = {American Journal of Political Science},
       year = {1998}
    }
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
\footcite{a,b}
\end{document}
2
\documentclass{article}
\usepackage{filecontents}
\usepackage[backend=biber,style=authoryear-comp]{biblatex}

\renewcommand*{\compcitedelim}{\space\bibsstring{and}\space}

\begin{filecontents}{\jobname.bib}
@article{a,
       author = {A and B},
       title = {Title},
       journal = {American Journal of Political Science},
       year = {1995},
       type = {Journal Article}
    }

@article{b,
       author = {A and B},
       title = {Title},
       journal = {American Journal of Political Science},
       year = {1998}
    }
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
\footcite{a,b}
\end{document}

enter image description here

  • 2
    Note that your definition introduces spurious double-spaces after the "and", I'd use biblatex's bibstrings and would go with \renewcommand*{\compcitedelim}{\addspace\bibstring{and}\space}. Of course it would be even nicer if we could detect if we are at the last year in a list and have a comma for all other years. – moewe Nov 23 '16 at 15:27
  • @moewe Thanks for your comment! I was just browsing the documentation to find this command. – user36296 Nov 23 '16 at 15:29

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.