9

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: table of 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: unknown theoremstyle warning

Moreover, all of the environments in the compiled PDF look indistinguishable to me: theorem, proposition, example, and remark environments definition environment

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)?

1
  • The main issue having been solved, the two theoremstyles are still messed up, arent' they?
    – shuhalo
    Commented Oct 14, 2023 at 7:41

2 Answers 2

14

The template is set up with this preamble outline in sn-article.tex:

\documentclass[sn-mathphys,Numbered]{sn-jnl}% Math and Physical Sciences Reference 
% <some more package loading>
\usepackage{amsthm}%
% <some more preamble stuff>

So, one would think that amsthm-related structures (like the theorem styles) would be loaded properly. However, the definition of these styles happen within sn-jnl.cls. So, at the time that class file is processed, amsthm has not been loaded, and therefore the theorem definitions aren't executed. Within sn-jnl.cls it checks whether amsmath is loaded before defining the styles, but again, at the time the class file is processed, no amsthm is present, so it just ignores anything amsthm-related.

The template (sn-article.tex) should have been set up in this way:

\RequirePackage{amsthm}

\documentclass[sn-mathphys,Numbered]{sn-jnl}% Math and Physical Sciences Reference 
% <some more package/preamble stuff>

With the above order, amsthm is loaded before the class, thereby defining the appropriate theorem styles.

2
  • 1
    It's unbelievable that Springer Nature made such a dumb mistake and that they still haven't fixed it.
    – tparker
    Commented Oct 5, 2023 at 2:38
  • 1
    @tparker: indeed, you'd expect to have the money to get their act straight. That tells you how the company is actually run...
    – shuhalo
    Commented Oct 14, 2023 at 7:40
0

Unfortunately, Werner's solution triggers some other issues.

%\RequirePackage{amsthm} % Avoids the Warning "Unknown theoremstyle `thmstyleone' on input line ***",
% but triggers other issues
\documentclass[sn-mathphys-num,pdflatex]{sn-jnl} % Math and Physical Sciences Reference Style

\usepackage{amsmath,amssymb}
\usepackage{amsthm}

%% as per the requirement new theorem styles can be included as shown below
\theoremstyle{thmstyleone}
\newtheorem{dummy}{Dummy}[section] % dummy environment, to generate a counter for the other environments
\newtheorem{proposition}[dummy]{Proposition}

%\theoremstyle{definition} % thmstylethree is not working as intended (it uses italic instead of roman)
\theoremstyle{thmstylethree}
\newtheorem{definition}[dummy]{Definition}

\begin{document}

\begin{definition}
Let $S$ be any ring.
\end{definition}

\begin{proposition}
If $S = R[x]$, then we are doomed.
\end{proposition}

\begin{proof}
It is sufficient to prove that nothing else matters.
%
\end{proof}
\noindent \emph{Proof.} It is sufficient to prove that nothing else matters. (this line is outside the Proof environment)

\end{document}

The code above has the following output:

enter image description here

Notice that thmstylethree is not working as announced in the User Manual (it uses italic instead of roman font). Changing \theoremstyle{thmstylethree} to \theoremstyle{definition} solves this issue (I omit the corresponding output). In this case there are two warnings: one for thmstyleone and other for thmstylethree, because we are invoking the amsthm package after \documentclass. But using \RequirePackage{amsthm} before \documentclass yields the following output:

enter image description here

Besides the extra vertical space introduced, the word "Proof" in the Proof environment lacks the dot. Even worse, the font size in the Proposition and Proof environments is reduced!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .