As displayed in the table below, the Springer Nature journal article template (available through Overleaf here or from the Springer Nature website here) is supposed to have three predefined theorem styles:
In the supplied sn-jnl.cls
file, these environments are presumably defined by the following code:
\newtheoremstyle{thmstyleone}% Numbered
{18pt plus2pt minus1pt}% Space above
{18pt plus2pt minus1pt}% Space below
{\small\itshape}% Body font
{0pt}% Indent amount
{\small\bfseries}% Theorem head font
{}% Punctuation after theorem head
{.5em}% Space after theorem headi
{\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
\thmnote{ {\the\thm@notefont(#3)}}}% Theorem head spec (can be left empty, meaning `normal')
%
\newtheoremstyle{thmstyletwo}% Numbered
{18pt plus2pt minus1pt}% Space above
{18pt plus2pt minus1pt}% Space below
{\small\normalfont}% Body font
{0pt}% Indent amount
{\small\itshape}% Theorem head font
{}% Punctuation after theorem head
{.5em}% Space after theorem headi
{\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }{#2}}%
\thmnote{ {\the\thm@notefont(#3)}}}% Theorem head spec (can be left empty, meaning `normal')
%
\newtheoremstyle{thmstylethree}% Definition
{18pt plus2pt minus1pt}% Space above
{18pt plus2pt minus1pt}% Space below
{\small\normalfont}% Body font
{0pt}% Indent amount
{\small\bfseries}% Theorem head font
{}% Punctuation after theorem head
{.5em}% Space after theorem headi
{\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
\thmnote{ {\the\thm@notefont(#3)}}}% Theorem head spec (can be left empty, meaning `normal')
The code for the head/body text formatting in the second style seems to be flipped from what is claimed in the table above; however, I'm running into a much more basic problem. In their sample sn-article.tex
document, they assign the following styles:
\theoremstyle{thmstyleone}%
\newtheorem{theorem}{Theorem}% meant for continuous numbers
%%\newtheorem{theorem}{Theorem}[section]% meant for sectionwise numbers
%% optional argument [theorem] produces theorem numbering sequence instead of independent numbers for Proposition
\newtheorem{proposition}[theorem]{Proposition}%
%%\newtheorem{proposition}{Proposition}% to get separate numbers for theorem and proposition etc.
\theoremstyle{thmstyletwo}%
\newtheorem{example}{Example}%
\newtheorem{remark}{Remark}%
\theoremstyle{thmstylethree}%
\newtheorem{definition}{Definition}%
However, when I compile the sn-article.tex
document on Overleaf or my local machine, I receive the following warnings:
Moreover, all of the environments in the compiled PDF look indistinguishable to me:
Question: Why are the theorem styles not behaving as claimed/expected and can this be fixed by modifying the sn-article.tex
file (but without modifying the sn-jnl.cls
file)?
Best Answer
The template is set up with this preamble outline in
sn-article.tex
:So, one would think that
amsthm
-related structures (like the theorem styles) would be loaded properly. However, the definition of these styles happen withinsn-jnl.cls
. So, at the time that class file is processed,amsthm
has not been loaded, and therefore the theorem definitions aren't executed. Withinsn-jnl.cls
it checks whetheramsmath
is loaded before defining the styles, but again, at the time the class file is processed, noamsthm
is present, so it just ignores anythingamsthm
-related.The template (
sn-article.tex
) should have been set up in this way:With the above order,
amsthm
is loaded before the class, thereby defining the appropriate theorem styles.