38

Suppose I make two citations at the same place

\cite{ref1}, \cite{ref2}

It would appear as

[1], [2]

Sometimes I see a reference like

[1, 2]

How is that done in TeX? Also, when should I use one over the other?

2
  • 3
    \cite{key1,key2}?
    – Sigur
    Apr 21, 2014 at 19:52
  • 1
    and with page number? Sep 11, 2021 at 12:29

2 Answers 2

53

Multiple citations at the same place can be achieved with

\cite{ref1,ref2,...}

Some bibliographic styles (ieee for example) turn multiple citations, i.e., [1,2] into [1], [2]. So, for the second part, it is a matter of the style used and customs.

3
  • 11
    Thank you! It is useful to realize that there should not be any space between the reference key and comma.
    – zyy
    Jun 27, 2017 at 17:26
  • Whys does that matter? I get the same result both ways.
    – S P Sharan
    Aug 22, 2021 at 6:47
  • how to do this with page numbers? Sep 11, 2021 at 12:30
0

If you want to include page numbers, you can use BibLaTex's \cites command (as described here) or you can use BibTex with the xparse package and define your own command.

\usepackage{xparse}

% Takes up to 4 pairs of citations with optional page reference
\NewDocumentCommand{\multicite}{ogogogog}{%
    \citetext{%
        \IfValueT{#2}{%
            \IfValueT{#1}{\citealp[p.~#1]{#2}}%
            \IfNoValueT{#1}{\citealp{#2}}%
        }%
        \IfValueT{#4}{%
            ;
            \IfValueT{#3}{\citealp[p.~#3]{#4}}%
            \IfNoValueT{#3}{\citealp{#4}}%
        }%
        \IfValueT{#6}{%
            ;
            \IfValueT{#5}{\citealp[p.~#5]{#6}}%
            \IfNoValueT{#5}{\citealp{#6}}%
        }%
        \IfValueT{#8}{%
            ;
            \IfValueT{#7}{\citealp[p.~#7]{#8}}%
            \IfNoValueT{#7}{\citealp{#8}}%
        }%
    }
}

Example usage:
\multicite[1]{Sjostrom2018}{Kerly2007}[3]{Winkler2019}
leads to:

(Sjöström et al., 2018, p. 1; Kerly et al., 2007; Winkler und Roos, 2019, p. 3)

You must log in to answer this question.

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