9

I am writing a paper to a Springer journal and I am trying to use their \bibliographystyle{spbasic}. I want to sort citation by appearance, hence the first citation in the article should be cited with [1] and second with [2] and so on. But citation is sort by the reference's alphabetically order.

\documentclass[smallextended]{svjour3}
\begin{document}
\usepackage[sort&compress,numbers]{natbib}
.............. \cite{S1} .......... \cite{S2}
\bibliographystyle{spbasic} 
\bibliography{sssat.bib}   % name your BibTeX data base

\end{document}
0
12

You need to create and use a modified version of the spbasic bibliography style.

  • Find the file spbasic.bst on your computer. Create a copy of this file and call the copy, say, spbasic_unsort.bst.

  • Open the file spbasic_unsort.bst in a text editor.

  • Find the two lines that start with SORT (note: uppercase is important), and comment out -- or simply delete -- both of these lines.

  • Save the file spbasic_unsort.bst either in the directory that contains your main tex file or in a directory that's searched by your tex distribution. If you choose the latter method, be sure to also update the filename database of your TeX distribution.

  • In your main tex file, change the instruction \bibliographystyle{spbasic} to \bibliographystyle{spbasic_unsort}. Then, rerun LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes.

This technique also works for the \bibliographystyle{spmpsci}, where the same problem is observed. There is only one instance of a line (line number 1462) starting with SORT in the file spmpsci.bst. Either we can comment or delete that line.

Happy BibTeXing!

4
  • I delete the line but it doesn't work. I think i make some mistakes. Can you please see ideone.com/akgvBN ? Can you tell me the exact line number? @Mico – Animesh Kumar Paul Jun 4 '16 at 4:55
  • @AnimeshKumarPaul - One of the instructions said, "Find the two lines that start with SORT ...". Please look for lines 1572 and 1625. – Mico Jun 4 '16 at 5:56
  • If removing lines starting with SORT does not work, that's probably because you did not remove temporary files created by LaTeX. – Didier Sep 15 '16 at 14:07
  • @SouravMondal -- Many thanks for this additional thought. It may be worth pointing out that the approach proposed in my answer should work with virtually all bibliography styles, not just spbasic and spmpsci. The only major thing to keep track of is how SORT-lines need to be deleted (or commented out). – Mico Apr 5 '20 at 13:37

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