1. sanam

Thanks so much… I was almost desperate ….

2. meg

thanks!! helps a lot with my dissertation!

3. Bill

You are the man!

4. Kamalesh

Which style did you use? I tried with unsrt, it did not work.

5. touché!

6. sinistrarcobaleno

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??

7. This doesn’t seem to always work, can you put an example file for testing?

Thanks.

8. ali

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&amp;compress]{natbib}

and used

~\cite{dejan07expanding,dan94scheduling}

and got
[1,2]

i did not test [1-2]

9. ali

hi all
it also works for [1-4] 🙂

10. Hassan

Hello

You are a life saver

thank you

11. Hung La

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

12. Olivia

Thank you so much, just saved me so much time – submission two days away!

13. anon

thank you!

14. allefant

Thanks a lot, this info is surprisingly hard to find.. well, if it weren’t for the google result with this blog entry 🙂

15. Thanks a lot!
🙂

16. mine

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.

17. Lu

Save me a lot of time…Thanks!

18. Chris

Great! Thank you so much.

19. San

Thank you, I _love_ summaries like yours, short and precise. 🙂

20. Matic

Thank you!!! You saved me a lot of browsing the web!

21. Ben

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…

• I agree with Ben; \usepackage{cite} solved the problem for me.

• Jussi

It’s easier just to type \usepackage{cite}… natbib-package didn’t work for me 🙁

22. anon

This has bugged me since I first began using LaTeX. Thank you for scratching that itch!

23. mlm

Finally found it here! Thanks!

24. Thomas

Thank you soo much! I expected hours of google’ing and going down hundreds of levels in threads.
You are a life-saver

25. Mex

Thank you, saved me a lot of time, you’re awesome!

26. Hey, I like you’re bloq and you’re content is valuable, keep on blogging

27. GC

Thanks for the generous post! Saved me a lot of work!

28. jonathan

cool!

29. arun

thanks, worked for me after including \usepackage{cite}.

• Nagaraja

Arun

Thanks a lot. I love you

30. DecoL

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.

31. Kaioh

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

• Hi AA,

I suggest you use the natbib package. The following options should do the trick:

\usepackage[numbers, square, comma, sort&amp;compress]{natbib}
\usepackage{hyperref}
...
\citep{first, second, third, etc.}

For additional customization you may want to consult this reference sheet.

Best, Tom.

• Kaioh

That’s it. Thank you tom.
AA

32. cysiphist

Thank you! Funny how sometimes the solution is quite simple, but we don’t think of it/know it.

33. sar

thanks alot for help

34. Mike

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?

• 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.

• Mike

Hi Tom,
I just did that and it worked perfectly! many thanks

cheers!
Mike

35. SS

Thank you …. it works for me … Many thanks

36. […] 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 […]

37. Thank you …

38. eeeee

thank you very much. I tried 100 type but this is working. thanks

• You are welcome!

39. A. Douglas Stone

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.

• Thanks for your comment. Great to know this was of help. Tom.

40. Maryam

Thanks a lot Dear Tom. It was really helpful

41. swaroop

In report class cite package is not working… it showing error..:(

• 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}
\begin{document}
Dummy citation \cite{knuth2006art1, knuth2006art2, knuth2006art3}
\printbibliography
\end{document}
42. B.Dier

hi tom…
I am using

\usepackage[numbers, square, comma, sort&amp;compress]{natbib}

\bibliographystyle{unsrt}
\bibliography{DB_Bib}

I have a problem of consistency of citations, like [4] [5] [2] [8] [3] etc. How can this be. fixed
thanks.

• Hi!

Try using the unsrtnat style instead and cite multiple references using the same cite command (\cite{ref1,ref2,ref3}). If that doesn’t help, please provide a minimal working example and I’ll be happy to see what’s going on in your code. Finally, I strongly suggest moving to the biblatex package, unless you need backward compatibility.

Tom

• B.Dier

hi Tom.
Input = ~\cite{14}~\cite{16}~\cite{18}~\cite{20}~\cite{30}
Output = [10] [5] [11] [6] [9]

thanks
Bd

• Try deleting all meta and output files (aux, blg, bbl, etc.) and rerun latex, bibtex, latex (2x). That should fix it.

Cheers, Tom

43. Zia Ud Din

I need this refernce multiple refernce style in Mendeley. Any one who can help, i will be thankfull.

44. Thank you so much (Y)