7

I am citing two articles by the same author in the same year, referenced by the keys auth00a and auth00b. With the authoryear-comp style, I can use textcite{auth00a,auth00b} but this gives me "Author (2000a,b)" in the result. I would much rather have "Author (2000a, 2000b)"; that is, the years in full. Is there an easy way to do this? Thanks!

3
12

Add the following lines in the preamble (package xpatch is needed):

\usepackage{xpatch}
\xpatchbibmacro{textcite}
  {\setunit{\addcomma}\usebibmacro{cite:extrayear}}
  {\setunit{\compcitedelim}\usebibmacro{cite:labelyear+extrayear}}
  {}
  {}

MWE:

\documentclass{article}

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

\usepackage{xpatch}
\xpatchbibmacro{textcite}
  {\setunit{\addcomma}\usebibmacro{cite:extrayear}}
  {\setunit{\compcitedelim}\usebibmacro{cite:labelyear+extrayear}}
  {}
  {}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{auth00a,
  author = {Author},
  title = {MyBook A},
  date = {2000}
}
@article{auth00b,
  author = {Author},
  title = {MyBook B},
  date = {2000}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
\textcite{auth00a,auth00b}
\end{document} 

Output:

enter image description here

3
  • That looks like a very comprehensive solution - thank you very much. Is this sort of fine-tuning described in the Biblatex documentation?
    – Alasdair
    Jan 29 '14 at 8:38
  • @Alasdair unfortunately not. I've learned how to do similar things in this site... Jan 29 '14 at 8:42
  • @Alasdair BTW, remember that you can accept (and upvote) the answer if it solves your problem :-) Jan 29 '14 at 8:44

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.