61 Comments

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

  2. 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&compress]{natbib}

    and used

    ~\cite{dejan07expanding,dan94scheduling}

    and got
    [1,2]

    i did not test [1-2]

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

  4. allefant

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

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

  6. 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…

  7. Thomas

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

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

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

  10. cysiphist

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

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

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

    • 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}
  13. B.Dier

    hi tom…
    I am using

    \usepackage[numbers, square, comma, sort&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.
        I was talking about following:
        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

Leave a Reply