I'm a total newbie at LaTeX, and I'm trying to figure out how to sort citations within a paper I'm writing for a conference based on their appearance in the document itself. The conference has a specific style they want for the paper/bibliography, so I tried using this code for my paper. When I compiled the first time, this went fine and everything was ordered properly, but then I went in to edit a citation, and recompiled in Bibtex and then LaTeX, and it went back to being alphabetically. Am I doing something wrong? What's the best way to make the bibliography sort by appearance of citation?
Thanks so much!
\documentclass[a4paper,11pt,twocolumn]{article}
\usepackage{ICPhS2015}
\usepackage{graphicx}
\title{this is the title of my paper}
\author{XXX}
\organization{XXX}
\email{XXX}
\begin{document}
\begin{document}
Words \cite{gu_smoothing_2002} words \cite{_matlab_2012} words \cite{gu2007gss} words \cite {r_developmentcoreteam_r:_2007} words
\bibliographystyle{ICPhS2015}{unsrt}
\bibliography{ICPhS2015}
\end{document}
And here's an example of the bibliography, which I want to sort by citation appearance, not by alphabetical order…
\begin{thebibliography}{10}
\bibitem{r_developmentcoreteam_r:_2007}
{DevelopmentCoreTeam}, R. 2007.
\newblock {\em R: A language and environment for statistical computing}.
\newblock R Foundation for Statistical Computing.
\bibitem{gu_smoothing_2002}
Gu, C. 2002.
\newblock {\em Smoothing Spline {ANOVA} Models}.
\newblock Springer Series in Statistics. Springer New York.
\bibitem{gu2007gss}
Gu, C. 2007.
\newblock gss: General smoothing splines.
\newblock http://cran.r-project.org/web/packages/gss/gss.pdf.
\bibitem{_matlab_2012}
MATLAB, 2012.
\newblock {\em Version 7.14.0.039 (R2012a)}.
\newblock The {MathWorks} Inc.
\end{thebibliography}
Best Answer
I do not have the bibliography style you used in your MWE. Do you have a link to the style so that we can use it?
So I changed your MWE to show you how you can get the wanted result. The trick is to use the bibliography style
unsrt
. Then you get the bibliography list in the order of the cite calls. Packagefilecontents
is used to have the bib file and the tex code in one MWE:See the order of entries in the bib file and the order of calls in the MWE.
I get the following pdf file:
Can you adapt this to your needs?