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?
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?
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.
Just put multiple sources inside \cite{} argument field:
\documentclass{article}
\usepackage[]{biblatex}
\addbibresource{refs.bib} %Import the bibliography file
\begin{document}
multiple citation example: \cite{article1,article2,article3}
\end{document}
Output:
You can choose variant of the numeric style by specifying
option citestyle= inside {biblatex} package e.g.:
\usepackage[citestyle=numeric-comp,]{biblatex}
There is also option for separate look:
\usepackage[citestyle=numeric-verb,]{biblatex}
biblatex-examples.bib and pick entries from there anybody with Biblatex installed will be able to compile your example.
– cfr
Dec 25 '23 at 00:50
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)
\cite{key1,key2}? – Sigur Apr 21 '14 at 19:52