1

For the same author, I want a reference like Doe (1990; 1997) rather than Doe (1990) and Doe (1997), and I want (Doe 1990; 1997) rather than (Doe 1990; Doe 1997).

In other words, my question is very close to this question but I am using biblatex, not natbib.

Is there a straightforward, simple way to do this? Apologies if I am overlooking something.

Here is the MWE:

\documentclass{standalone}
\usepackage[applemac]{inputenc}
\usepackage[backend=biber,style=authoryear,giveninits]{biblatex}
\bibliography{Literature}
\begin{document}

I get ``\textcite{Doe1996,Doe1990}" but I want ``Doe (1990; 1997)". I get ``\autocite{Doe1996,Doe1990}" but I want ``(Doe 1990; 1997)"
\end{document}
12
  • 2
    style=authoryear-comp should give you the desired result. From the biblatex documentation: "A compact variant of the authoryearstyle which prints the author only once if subsequent references passed to a single citation command share the same author. ". See also: Biblatex - Combine Papers using citet for a similar question.
    – leandriis
    Jul 20, 2020 at 8:11
  • 1
    Please prepare a complete and compilable minimal working example with bibliography (MWEB) that contains two sample entries with which you get the desired compressed output and two entries for which the compression deso nt work as expected. Probably the issue is hidden in the entry in the .bib file.
    – leandriis
    Jul 20, 2020 at 12:17
  • 2
    style=authoryear-comp, as suggested by leandriis should get you pretty far. The only difference is that it uses a comma to separate years and not a semicolon, but that could be changed if desired. If you don't get 'compact' citations despite using style=authoryear-comp,, you need to show us a compilable example complete with .bib entries (you can use biblatex-examples.bib and the two entries knuth:ct:a and knuth:ct:b). The following works for me gist.github.com/moewew/4f45ab210f29494406b7b08848d817a1
    – moewe
    Jul 20, 2020 at 14:41
  • 1
    By default filecontents will not overwrite an existing file. This is a problem when your are experimenting and adding entries one by one. Of course you could always remove the automatically generated .bib file when you add a new entry, but that is cumbersome. There are ways to allow filecontents to overwrite existing files. In a current LaTeX version write \begin{filecontents}[force]{\jobname.bib} instead of \begin{filecontents}{\jobname.bib} to allow overwriting. In an older LaTeX version load \usepackage{filecontents}.
    – moewe
    Jul 24, 2020 at 19:36
  • 1
    Great! Looking forward to the MWE.
    – moewe
    Jul 25, 2020 at 7:15

1 Answer 1

2

Switching the style from style=authoryear to style=authoryear-comp should result in an output quite close to the desired one.

From the biblatex documentation: "A compact variant of the authoryearstyle which prints the author only once if subsequent references passed to a single citation command share the same author ".

See also: Biblatex - Combine Papers using citet for a similar question.


By default, the separator between subsequent years is a comma, while your example shows a semicolon instead. If you want to change the output accordingly, you could redefine \compcitedelim according to your needs:

\renewcommand*{\compcitedelim}{\addsemicolon\space}

If a single person published using two different versions of their first name, the compression might not work as expected since the author is treated as two different authors who share their last name. To turn off this behaviour without having to alter (homogenize) the first names in the bib file, you can use the package option uniquename = false.

See also: biblatex, authoryear style: In-text citations display first name initials for certain bibliography entries for a related question.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .