Springer Nature 模板出现“未知定理样式”警告

Springer Nature 模板出现“未知定理样式”警告

如下表所示,Springer Nature 期刊文章模板(可通过 Overleaf这里或访问 Springer Nature 网站这里) 应该有三种预定义的定理样式: 预定义定理样式表

在提供的sn-jnl.cls文件中,这些环境大概由以下代码定义:

\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')

第二种样式的头部/正文文本格式代码似乎与上表所声称的不一致;但是,我遇到了一个更基本的问题。在他们的示例sn-article.tex文档中,他们指定了以下样式:

\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}%

但是,当我sn-article.tex在 Overleaf 或本地机器上编译文档时,收到以下警告: 未知的理论样式警告

此外,编译后的 PDF 中的所有环境对我来说看起来都难以区分: 定理、命题、例子和评论环境 定义环境

问题:为什么定理样式的表现不如所声称/预期的那样,可以通过修改sn-article.tex文件来解决这个问题(但不修改sn-jnl.cls文件)吗?

答案1

模板是根据以下序言大纲设置的sn-article.tex

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

因此,人们可能会认为amsthm相关结构(如定理样式)将正确加载。然而,这些样式的定义之内 sn-jnl.cls。因此,在处理类文件时,amsthm尚未加载,因此不会执行定理定义。在定义样式之前,sn-jnl.cls它会检查是否amsmath已加载,但同样,在处理类文件时,不amsthm存在,因此它会忽略任何amsthm与 相关的内容。

模板(sn-article.tex)应按如下方式设置:

\RequirePackage{amsthm}

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

按上述顺序,amsthm在类之前加载,从而定义适当的定理样式。

相关内容