Recently, I was wondering how to cite multiple references at once, e.g. [1, 5, 9] or even [1-3, 6, 8]. It took me quite some time to find a solution on the web, which is one of the reasons I am posting this article here.
The solution is astonishingly easy. If you want to cite multiple references within the same brackets, you just need to separate the labels with a comma. In addition, you’ll need to load the cite package which will automatically check if your labels are part of an ordered list and reduce the list by replacing all the “in-betweens” with a hyphen.
\usepackage{cite}
...
\cite{citation1, citation2, citation3}
Here is a minimal working example:
\documentclass{article}
\usepackage{cite}
\begin{filecontents}{publication.bib}
@book{knuth2006art1,
title={The art of computer programming: Generating all trees: history of combinatorial generation},
author={Knuth, D.E.},
year={2006},
publisher={Addison-Wesley}
}
@book{knuth2006art2,
title={The art of computer programming: Generating all trees: history of combinatorial generation},
author={Knuth, D.E.},
year={2006},
publisher={Addison-Wesley}
}
@book{knuth2006art3,
title={The art of computer programming: Generating all trees: history of combinatorial generation},
author={Knuth, D.E.},
year={2006},
publisher={Addison-Wesley}
}
\end{filecontents}
\begin{document}
Dummy citation \cite{knuth2006art1, knuth2006art2, knuth2006art3}
\bibliographystyle{plain}
\bibliography{publication}
\end{document}

July 14th, 2007 at 5:20 am
Thanks so much… I was almost desperate ….
August 2nd, 2007 at 10:01 pm
thanks!! helps a lot with my dissertation!
December 28th, 2007 at 4:16 pm
You are the man!
January 9th, 2008 at 11:27 pm
Which style did you use? I tried with unsrt, it did not work.
January 12th, 2008 at 5:40 pm
touché!
February 14th, 2008 at 2:26 pm
uhm, I got [1,2,3] instead of [1-3]. Should I put something somewhere to tell bibtex to check the orere of my citations??
March 12th, 2008 at 3:26 pm
This doesn’t seem to always work, can you put an example file for testing?
Thanks.
March 17th, 2008 at 10:44 pm
Hi Methew,
You are right. Check out my other post on Natbib.
Cheers,
Tom
June 21st, 2008 at 11:52 pm
Hi all
at first mine didnt work too
but when i added the Natbib to my latex it worked!!!
i dont know what is their relation but it works now
i added the below line in the beginning
\usepackage[square, comma, sort&compress]{natbib}and used
~\cite{dejan07expanding,dan94scheduling}and got
[1,2]
i did not test [1-2]
June 22nd, 2008 at 12:00 am
hi all
it also works for [1-4]
August 9th, 2008 at 3:58 am
Hello
You are a life saver
thank you
August 17th, 2008 at 10:50 pm
I already \usepackage[square, comma, sort&compress]{natbib} and get good result [1-10], but the font size of reference section is bigger than other sections. For example in its font size is 11 pt, others are 10pt although I set \documentclass[letterpaper, 10 pt, conference]{ieeetran}. Can someone else help me to out this problem?
Thanks very much
August 27th, 2008 at 9:11 pm
Hi,
What you can try is the following: After your \usepackage…
\bibfont\small or whatever size of font you are using.
Here is a complete reference of the natbib package:
http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib/natbib/natbib.pdf
Hope this works,
Tom
October 7th, 2008 at 10:37 am
Thank you so much, just saved me so much time – submission two days away!
November 15th, 2008 at 10:42 pm
thank you!
November 24th, 2008 at 2:36 pm
Thanks a lot, this info is surprisingly hard to find.. well, if it weren’t for the google result with this blog entry
December 21st, 2008 at 2:11 pm
Thanks a lot!
January 6th, 2009 at 9:25 am
Great info thanks. BTW, make sure you don’t leave spaces around the commas. eg – \cite{a,b,c} and not \cite{a, b, c}. The latter breaks for me.
April 5th, 2009 at 12:40 am
Save me a lot of time…Thanks!
July 1st, 2009 at 9:38 pm
Great! Thank you so much.
July 29th, 2009 at 3:13 pm
Thank you, I _love_ summaries like yours, short and precise.
July 31st, 2009 at 8:12 am
Thank you!!! You saved me a lot of browsing the web!
August 19th, 2009 at 10:12 am
If the comma separation does not work, try to include the “cite”-package.
\include{cite}It does the trick for me, without using special natbib cite commands…
November 27th, 2010 at 1:56 am
I agree with Ben;
\usepackage{cite}solved the problem for me.July 11th, 2011 at 10:57 am
It’s easier just to type
\usepackage{cite}… natbib-package didn’t work for meSeptember 21st, 2009 at 9:49 am
This has bugged me since I first began using LaTeX. Thank you for scratching that itch!
October 15th, 2009 at 9:07 am
Finally found it here! Thanks!
October 20th, 2009 at 8:17 pm
Thank you soo much! I expected hours of google’ing and going down hundreds of levels in threads.
You are a life-saver
October 20th, 2009 at 11:07 pm
Thank you, saved me a lot of time, you’re awesome!
May 17th, 2010 at 4:33 pm
Hey, I like you’re bloq and you’re content is valuable, keep on blogging
June 15th, 2010 at 9:36 pm
Thanks for the generous post! Saved me a lot of work!
November 10th, 2010 at 3:51 pm
cool!
January 23rd, 2011 at 4:24 am
thanks, worked for me after including
\usepackage{cite}.June 20th, 2012 at 10:01 am
Arun
Thanks a lot. I love you
June 6th, 2011 at 11:19 pm
Thank you so much. I was trying to do the same thing and went thru a lot of pages until I found my solution here. Thank you again.
June 14th, 2011 at 4:52 pm
Dear all, can someone please enlight me on this;
If I put the following:
\documentclass[journal]{IEEEtran} \usepackage[pdftex]{graphicx,hyperref,color} \usepackage{cite}the citations will appear like this:
[1], [2], [3], [4], and with a hyper ref.
If I put the following:
\documentclass[journal]{IEEEtran} \usepackage{cite} \usepackage[pdftex]{graphicx,hyperref,color}the citations will appear like this:
[1-4], but without hyper ref
This seams a bit stupid, and strange, but I could not find the solution until now. Can someone help me on this, please?
Thank you all,
AA
June 16th, 2011 at 4:30 am
Hi AA,
I suggest you use the natbib package. The following options should do the trick:
\usepackage[numbers, square, comma, sort&compress]{natbib} \usepackage{hyperref} ... \citep{first, second, third, etc.}For additional customization you may want to consult this reference sheet.
Best, Tom.
June 18th, 2011 at 3:40 pm
That’s it. Thank you tom.
AA
June 28th, 2011 at 9:33 pm
Thank you! Funny how sometimes the solution is quite simple, but we don’t think of it/know it.
July 17th, 2011 at 9:36 am
thanks alot for help
August 18th, 2011 at 3:57 pm
thanks guys, natbib thing didnt work for me, i used \usepackage{cite}. but hey guys, how do i have roman numerals for first pages of my thesis and then arabic numbers for the main body?
August 18th, 2011 at 4:13 pm
Hi Mike,
Just change the page numbering within your text where required:
\begin{document} \pagenumbering{style1} ... \pagenumbering{style2} ...Available styles include:
arabic, roman, Roman, alph and Alph.Cheers, Tom.
August 18th, 2011 at 8:50 pm
Hi Tom,
I just did that and it worked perfectly! many thanks
cheers!
Mike
August 26th, 2011 at 2:56 pm
Thank you …. it works for me … Many thanks
September 2nd, 2011 at 11:57 pm
[...] multiple documents in a single set of brackets is darn easy. But to order the citation in increasing sequence of label takes a new package, natbib. Natbib is [...]
February 22nd, 2012 at 2:55 pm
Thank you …
September 15th, 2012 at 5:58 pm
thank you very much. I tried 100 type but this is working. thanks
September 15th, 2012 at 6:03 pm
You are welcome!
October 9th, 2012 at 1:19 am
Thanks a lot – I have been annoyed by the consecutive citations spreading out over entire lines for a while, but never knew how to solve it.
October 9th, 2012 at 2:41 am
Thanks for your comment. Great to know this was of help. Tom.
January 5th, 2013 at 7:43 am
Thanks a lot Dear Tom. It was really helpful
April 23rd, 2013 at 1:34 pm
In report class cite package is not working… it showing error..:(
April 23rd, 2013 at 4:27 pm
Hi!
I’m almost certain the incompatibility is not with report. Do you use biblatex and biber? You will get automatic compression of citations there. Otherwise, take a look at the log file and please provide a minimal example or at least the error you get. Below is a biblatex example (it requires the publication.bib file from the post above).
HTH,
Tom
\documentclass{report} \usepackage[backend=biber, style=chem-acs,biblabel=brackets]{biblatex} \addbibresource{publication.bib} \begin{document} Dummy citation \cite{knuth2006art1, knuth2006art2, knuth2006art3} \printbibliography \end{document}