[Tex/LaTex] Unable to generate bibliography with Springer Latex template

bibliographiestemplates

I have to use Springer [sn-mathphys]{sn-jnl} template to submit a paper and I'm afraid that I'm unable to generate the bibliography. Not even when I use the sample file sn-article.tex that they provide, without changing anything! However, when I compile the file changing the style to
\documentclass{article} everything goes fine.

I've tried TexnicCenter and with Winedt; both of them with Biblatex and Biber. In all cases, I keep on getting the error:

" Cannot find 'sn-article.bcf'!"

The format can be found here: https://www.springernature.com/gp/authors/campaigns/latex-author-support

I've searched the web for hours and I've tried many things. Neither one worked. For example:

  1. add at the preamble \usepackage{natbib}
  2. Create the .bbl file and then use \input{sn-article.bbl}

I've seen that many people have had this same problem for years, but I'm afraid that the solutions that they applied are not working for me. Can anyone help me, please?

Best Answer

I struggled with this for over 3 hours. So, for anyone going through the same.

There is a problem with sns-basic and sns-mathphys bib style files, so I recommend you use sns-vancuover or sns-aps options to the sn-jnl class. The author-year styles like sns-apa should also work, though I have not tried them.

Before you compile your latex script, go to the sn-jnl.cls file and replace the following lines starting with the %% Macros for bibliographystyles %% heading on Line 1643 and ending with the %% Macros for border matrix %% heading on Line 1732 as at Nov 15 2021.

%% Macros for bibliographystyles %%

% \def\bibcommenthead{\if@bibcomment\begingroup\parindent=0pt\parskip=0pt%
% \removelastskip\vskip13pt\nointerlineskip%
%
% \vbox{\bibfont If you are submitting to one of the Nature Research journals, using the eJP
%  submission system, please include the references within the manuscript file itself. You may
%  do this by copying the reference list from your .bbl file, and pasting it into the bibliography
%  environment of the main manuscript .tex file.}\par%
% \removelastskip\nobreak\vskip13pt\nobreak%
% \endgroup\fi}%

\def\bibcommenthead{}%

\if@Spr@basic@refstyle%
  \usepackage[authoryear]{natbib}%
  \gdef\NumBib{NO}%
  \bibliographystyle{bst/sn-basic}%
  \setlength{\bibsep}{1em}%
  \def\bibfont{\reset@font\fontfamily{\rmdefault}\normalsize\selectfont}%
\fi%
\if@Mathphys@refstyle%
  \usepackage[numbers,sort&compress]{natbib}%
  \gdef\NumBib{YES}%
  \bibliographystyle{bst/sn-mathphys}%
  \setlength{\bibsep}{1em}%
  \def\bibfont{\reset@font\fontfamily{\rmdefault}\normalsize\selectfont}%
\fi%
\if@APS@refstyle%
  \usepackage[numbers,sort&compress]{natbib}%
  \gdef\NumBib{YES}%
  \bibliographystyle{bst/sn-aps}%
  \setlength{\bibsep}{1em}%
  \def\bibfont{\reset@font\fontfamily{\rmdefault}\normalsize\selectfont}%
\fi%
\if@Vancouver@refstyle%
  \usepackage[numbers,sort&compress]{natbib}%
  \gdef\NumBib{YES}%
  \bibliographystyle{bst/sn-vancouver}%
  \setlength{\bibsep}{1em}%
  \def\bibfont{\reset@font\fontfamily{\rmdefault}\normalsize\selectfont}%
\fi%
\if@APA@refstyle%
  \usepackage[natbibapa]{apacite}%
  \gdef\NumBib{NO}%
  \bibliographystyle{bst/sn-apacite}%
  \def\refdoi#1{\urlstyle{rm}\url{#1}}%
  \renewcommand{\doiprefix}{}%
  \AtBeginDocument{%
    \renewcommand{\BPBI}{.}% Period between initials - command from apacite.sty
  }%
  \setlength{\bibsep}{1em}%
  \def\bibfont{\reset@font\fontfamily{\rmdefault}\normalsize\selectfont}%
\fi%
\if@Chicago@refstyle%
  \usepackage[authoryear]{natbib}%
  \gdef\NumBib{NO}%
  \bibliographystyle{bst/sn-chicago}%
  \hypersetup{urlcolor=black,colorlinks=false,pdfborder={0 0 0}}\urlstyle{same}%
  \setlength{\bibsep}{1em}%
  \def\bibfont{\reset@font\fontfamily{\rmdefault}\normalsize\selectfont}%
\fi%
\if@Standard@Nature@refstyle%
  \usepackage[numbers,sort&compress]{natbib}%
  \gdef\NumBib{YES}%
  \bibliographystyle{bst/sn-standardNature}%
  \setlength{\bibsep}{1em}%
  \def\bibfont{\reset@font\fontfamily{\rmdefault}\normalsize\selectfont}%
\fi%
\if@Default@refstyle%
  \usepackage[numbers,sort&compress]{natbib}%
  \gdef\NumBib{YES}%
  \setlength{\bibsep}{1em}%
  \def\bibfont{\reset@font\fontfamily{\rmdefault}\normalsize\selectfont}%
\fi%

\AtBeginDocument{\allowdisplaybreaks}%

\def\eqnheadfont{\reset@font\fontfamily{\rmdefault}\fontsize{16}{18}\bfseries\selectfont}%

\newcommand{\eqnhead}[1]{\begingroup%
\begin{center}
{\eqnheadfont #1}\par%
\end{center}
\removelastskip\vskip24pt%
\thispagestyle{titlepage}%%
%%\thispagestyle{empty}%
\endgroup}

%% Macros for border matrix %%
Related Question