78

How can I do multiple citations with page numbers using bibLaTeX/biber?

I have tried \cite[2,3,4]{ref1,ref2,ref3,ref4} but it doesn't work.

1
  • 1
    To what reference is associated page 2? Such citations are ambiguous.
    – egreg
    Commented May 23, 2011 at 22:21

2 Answers 2

94

You can use the multicite version of \cite:

\cites{ref1}[2]{ref2}[3]{ref3}[4]{ref4}

This will roughly give the following output:

<label1>; <label2>, p. 2; <label3>, p. 3; <label4>, p. 4

In general \cites takes arguments of the form

\cites(<multipre>)(<multipost>)[<pre>][<post>]{key}[<pre>][<post>]{key}...

where the first two arguments (<multipre>)(<multipost>) serve as an "overall" pre- and post-notes and the remaining arguments can be repeated as necessary. Citations are printed in the order given with compressed citation labels depending on the style.

For further details refer to material on "qualified citation lists" in the biblatex manual.

5
  • 6
    No problem. About your search - I am not surprised. The pertinent sections in the manual unfortunately use the term "multicite" and never "multiple citations".
    – Audrey
    Commented May 24, 2011 at 3:02
  • 3
    cool, works also for \parencites 8)
    – ptikobj
    Commented May 16, 2013 at 17:29
  • 6
    Just to clarify, the case of OP is a bit special, for there is no prenote (e.g. like "p.~x" or "Thm.~Y") for his/her first entry. To get something like "[16, p. 383, 5, p. 179]" where 16 and 5 are two keys,one should use \cites[p.~383]{key1}[p.~179]{key2}. It might be obvious at second look, but I spent some time re-arranging my arguments :-)
    – Clément
    Commented Jan 28, 2015 at 23:48
  • 6
    I know this is an old thread, but what is the relevant package for \cites?
    – jamesh625
    Commented May 19, 2017 at 4:29
  • 5
    @ jamesh625 biblatex package. Commented Jun 14, 2017 at 8:26
9

For those looking for the same feature, but in regular BibTex here's a working solution:

\usepackage{cite}
\makeatletter
\newcommand{\citecomment}[2][]{\citen{#2}#1\citevar}
\newcommand{\citeone}[1]{\citecomment{#1}}
\newcommand{\citetwo}[2][]{\citecomment[,~#1]{#2}}
\newcommand{\citevar}{\@ifnextchar\bgroup{;~\citeone}{\@ifnextchar[{;~\citetwo}{]}}}
\newcommand{\citefirst}{\@ifnextchar\bgroup{\citeone}{\@ifnextchar[{\citetwo}{]}}}
\newcommand{\cites}{[\citefirst}
\makeatother

Which you can use like this

\cites[p.1]{ref1}{ref2}[chap.3]{ref3}

to get an output similar to

[<label1>, p.1; <label2>; <label3>, chap.3]
2
  • 3
    Puuuh, somthing that works for me. Takes me around 2 hours to find it. but thank you! Commented Sep 10, 2021 at 11:43
  • 1
    This! Note that \citen will not update according to the citation style but always print the number. Thus, the solution will not work for similar problems like this one. Anyway, by replacing \citen with \citenum in the above code, the solution can be reused for natbib as well. Commented Apr 26, 2023 at 13:56

You must log in to answer this question.

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