6

I am working with the cite package for ieeetran document class and am using a separate bibtex file for managing the references.

I wanted the references in my pdf to appear in the order in which I have made the entries in the bibtex file. How can this be done?

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Speravir Feb 15 '14 at 3:53
  • I did that, but can I have an answer? – S_S Feb 15 '14 at 4:39
  • Sorry, but I cannot help here. You should consider using biblatex though. As far as I know with this would be possible, what you want. – Speravir Feb 15 '14 at 4:51
  • 1
    If I am not mistaken, IEEE Transactions suggest use of the cite package, so I was using that. Anyways, what I wish to do is that I want to arrange the references in a custom order, not according to their occurrence in the document, but according to the order in which the entries are made in the .bib file. Any suggestions? – S_S Feb 15 '14 at 5:26
6

Assuming you're using the IEEEtran bibliography style, there is a very simple method.

Add \nocite{*} just after \begin{document} and you will have all entries sorted according to their position in the .bib file.

MWE:

\documentclass{IEEEtran}
\usepackage{cite}

\usepackage{filecontents}
\begin{filecontents*}{examplebib.bib}
@article{art1,
author={First Last},
title={A fictitious journal article},
year=1900,
journal={Journal of nothingness},
volume=2,
pages={1-2}
}

@article{art2,
author={Assd},
title={A fictitious journal article},
year=1900,
journal={Journal of nothingness},
volume=2,
pages={1-2}
}

@book{boo1,
author={Respectable Writer},
title={A silly book},
year=2000,
publisher={PublishCo},
address={Somewhere}
}
\end{filecontents*}

\begin{document}
\nocite{*}

Welcome to TeX.SX. Here we cite \cite{art2} and \cite{boo1} and \cite {art1}

\bibliographystyle{IEEEtran}
\bibliography{examplebib}

\end{document} 

Output:

enter image description here

|improve this answer|||||
  • @Sumit you're welcome, happy to help. – karlkoeller Feb 15 '14 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.