# Bibliography references by order of appearance [duplicate]

I am putting together a big document based in many other small ones, and, as it is, I have a lot of references, much more than I wish to order by hand.

Is there a way to number these references by order of their appearance and not in the order I wrote them in the bibliography?

Let's say something like this:

...

The code is amazing (\cite{FirstGuy}) because it rules (\cite{SecondGuy}) and this is proven in \cite{ThirdGuy}

...

\begin{thebibliography}{99}

\bibitem{ThirdGuy} \textbf{G. Third}. \emph{Consistent proves of amazing code}
\bibitem{FirstGuy} \textbf{G. First}. \emph{Comments on amazing code}
\bibitem{SecondGuy} \textbf{G. Second}. \emph{Code that rules}


should produce something like this:

...

The code is amazing ([1]) because it rules ([2]) and this is proven in [3]}
...

[1] G.First. Comments on amazing code.
[2] G.Second. Code that rules.
[3] G.Third. Consistent proves of amazing code.


Is there a way to achieve this without using BibTex or similar tools? (because the effort required to import them is similar to sorting them by hand).

Thanks!

• (Close, short for McMaton) Yes, thank you, I will check that SE if I don't get an answer here. You are right about downvoters, after all, no one asks a question that they know has an obvious reason to be downvoted. – McMa Aug 23 '13 at 9:24
• It's just poor form to downvote a question without providing guidance on how to improve it. – Brandon Bertelsen Aug 23 '13 at 19:04
• SO is known for having a culture of downvoting. I don't think I've asked a single question there that hasn't been downvoted. – Sverre Sep 7 '13 at 14:42

If you are writing a large document with many references, I would suggest you use bibtex. So here is what you do. Put all your references into a .bib file, say "myreference.bib" and add this file by the end of latex file as,

\bibliographystyle{ieeetr}

\bibliography{myreference}

The "ieeetr" style will sort all your reference according to their appearing orders in the text. There are many other styles which also do the same work. For more information about the citation style, search in google for "latex bibliography style". Also I assume you know how to write bibtex, otherwise google is again your friend. (BTW, you can almost always find the available bibtex code when you download for certain scientific publications. Isn't that handy?)

Ummm. No.

A major part of bibtex (or any other bibliography program's) job is to remove the problem of having to maintain an ordered list of references. (la)tex will always output in order of definition.

You could sort by hand or write a script using sed/awk/perl/etc to do the re-ordering, but then all you are really doing is rolling your own bibtex.

• "Use BibTex" they kept on telling me, "it pays off in the long run"... :/ – McMa Aug 23 '13 at 8:41