I am quite new to LaTeX but am attempting to use the Springer Nature format available here.
The journal I am submitting to requires that I use sn-basic.bst and have the references in square brackets, numbered, sorted and compressed. I am familiar with the numbers and sort&compress options within natbib, however, I am unable to get these options working with sn-basic.bst.
After reading up on issues like this, I attempted to change the natbib options within sn-jnl.cls for the Springer Basic format. On line 1658 I changed \usepackage[authoryear]{natbib} to \usepackage[numbers,sort&compress]{natbib}. However, only the numbers option seems to take effect. That is, my references appear within square brackets as numbers, but they are not sorted and compressed where they should be.
Other things I have tried within my .tex file:
\usepackage[sort&compress, numbers]{natbib}, but this produces clash warnings/errors since it is already loaded withinsn-jnl.cls.\setcitestyle{sort&compress, numbers}\PassOptionsToPackage{numbers, sort&compress}{natbib}- Leaving
sp-basic.bstas is, but passing thenumbersandsort&compressoptions with the\documentclassoptions like so:\documentclass[sn-basic, numbers, sort&compress]{sn-jnl}. - Implementing the solution given here.
I am quite stuck on this and would appreciate if someone could please guide me on how to resolve this issue.
Thank you!
MWE... I hope: (Please let me know if I need to add more information to this!)
\documentclass[sn-basic]{sn-jnl}
\begin{document}
Words1 \cite{A2, A7, A5}, Words2 \cite{A1}
\bibliography{ABC}
\end{document}
Without any adjustments to sn-jnl.cls, the above code will generate citations with the authoryear format. Having made the adjustments to line 1658 indicated above, the code will generate citations with only the numbers option seeming to take effect.
natbibthat numeric-style citation call-outs should be sorted and (if possible) compressed. – Mico Oct 09 '21 at 17:31sn-basicdocument class option with thesn-jnldocument class, p. 12 of Springer's user manual for this document class states that this option produces authoryear-style citation call-outs, not numeric style citation call-outs. OTOH, if you are indeed supposed to be generating numeric-style citation call-outs, it would be wrong to use thesn-basicdocument class option; instead, you probably ought to use thesn-standardnaturedocument class option. Do please re-read your actual instructions to figure out what you're supposed to do. – Mico Oct 09 '21 at 17:42