svjour3 cls 使用相同的计数器解决定理、命题等问题

svjour3 cls 使用相同的计数器解决定理、命题等问题

我希望我的定理、引理等能够按以下方式计算,并包含以下部分:

Theorem 2.1
Lemma 2.2
Proposition 2.3
Corollary 3.4

ETC

以下是我对使用该类的文档的导入svjour3

\documentclass[smallextended]{svjour3}       % onecolumn (second format)
%\documentclass[twocolumn]{svjour3}          % twocolumn
%
\smartqed  % flush right qed marks, e.g. at end of proof
%
\usepackage{graphicx}
\usepackage[misc]{ifsym}
%
% \usepackage{mathptmx}      % use Times fonts if available on your TeX system
%
% insert here the call for the packages your document requires
%\usepackage{latexsym}
% etc.
\usepackage{mathpazo}
\usepackage{amsmath}
%\usepackage{amsfonts}
\usepackage{array,color}
\usepackage{abstract}
\usepackage[bottom]{footmisc}
%\usepackage{lipsum}
\usepackage[left=1.15in, right=1.15in, bottom=0.60in, includefoot]{geometry}
%\usepackage[all]{xy}
%\usepackage{graphicx}
\usepackage{indentfirst}
%\usepackage{csquotes}
\usepackage{bm}
%\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{makeidx}
%\usepackage{ifpdf}
\usepackage{url}
%\usepackage{graphicx}
\usepackage{dsfont}
\usepackage{latexsym}
%\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{color}
\usepackage{mathtools}
%%\usepackage{fixltx2e}
\usepackage{hyperref}
%\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
%\usepackage{MnSymbol}
%\numberwithin{equation}{subsection}

%
% please place your own definitions here and don't use \def but
% \newcommand{}{}
%
\newcommand{\grs}[1]{\raisebox{-.16cm}{\includegraphics[height=.5cm]{TP#1.pdf}}}
\newcommand{\gra}[1]{\raisebox{-.4cm}{\includegraphics[height=1cm]{TP#1.pdf}}}
\newcommand{\graa}[1]{\raisebox{-.6cm}{\includegraphics[height=1.5cm]{TP#1.pdf}}}
\newcommand{\grb}[1]{\raisebox{-.8cm}{\includegraphics[height=2cm]{TP#1.pdf}}}
\newcommand{\grc}[1]{\raisebox{-1.3cm}{\includegraphics[height=3cm]{TP#1.pdf}}}
\newcommand{\grd}[1]{\raisebox{-1.8cm}{\includegraphics[height=4cm]{TP#1.pdf}}}
\newcommand{\gre}[1]{\raisebox{-2.3cm}{\includegraphics[height=5cm]{TP#1.pdf}}}
\newcommand{\Pl}{\mathscr{P}}
\newcommand{\TL}{\mathcal{TL}}
\newcommand{\G}{\Gamma}
\newcommand{\F}{\mathcal{F}(\mathcal M)}
\newcommand{\g}{\gamma}
\newcommand{\sg}{\sigma}
\newcommand{\mc}{\mathbb{C}}
\newcommand{\ca}{\curvearrowright}
\newcommand{\eh}{\mathcal{H}}
\newcommand{\emm}{\mathcal{M}}
\newcommand{\emmt}{\tilde{\mathcal{M}}}
\newcommand{\enn}{\mathcal N}
\newcommand{\euu}{\mathcal{U}}
\newcommand{\la}{\lambda}
\newcommand{\ra}{\rangle}
\newcommand{\El}{\mathcal{L}}
\newcommand{\Sg}{\Sigma}
\newcommand{\rar}{\rightarrow}
\newcommand{\La}{\Lambda}
\newcommand{\lam}{\lambda}
\newcommand{\bten}{\bar\otimes}
\newcommand{\De}{\Delta}
\newcommand{\tp}{\bar{\otimes}}
\newcommand{\En}{\mathcal{N}}
\newcommand{\Aa}{\mathcal{A}}
\newcommand{\bee}{\mathcal{B}}
\newcommand{\cF}{\mathcal{F}}
\newcommand{\cA}{\mathcal A}
\newcommand{\cB}{\mathcal B}
\newcommand{\cC}{\mathcal C}
\newcommand{\cD}{\mathcal D}
\newcommand{\cE}{\mathcal E}
\newcommand{\cF}{\mathcal F}
\newcommand{\cG}{\mathcal G}
\newcommand{\cH}{\mathcal H}
\newcommand{\ci}{\mathcal I}
\newcommand{\cJ}{\mathcal J}
\newcommand{\cK}{\mathcal K}
\newcommand{\cL}{\mathcal L}
\newcommand{\cM}{\mathcal M}
\newcommand{\cN}{\mathcal N}
\newcommand{\cO}{\mathcal O}
\newcommand{\cP}{\mathcal P}
\newcommand{\cQ}{\mathcal Q}
\newcommand{\cR}{\mathcal R}
\newcommand{\cS}{\mathcal S}
\newcommand{\cT}{\mathcal T}
\newcommand{\cU}{\mathcal U}
\newcommand{\cV}{\mathcal V}
\newcommand{\cW}{\mathcal W}
\newcommand{\cX}{\mathcal X}
\newcommand{\cY}{\mathcal Y}
\newcommand{\cZ}{\mathcal Z}


\newcommand{\rip}{\mathcal{R}ips_\mathcal T}
\newcommand{\mg}{\mathcal G}
\newcommand{\mtil}{\tilde {\mathcal M}}
\newcommand{\mr}{\mathcal{R}}
\newcommand{\mrt}{\tilde{\mathcal{R}}}
\newcommand{\pee}{\mathcal{P}}
\newcommand{\Ad}{\operatorname{Ad}}
\newcommand{\id}{\operatorname{id}}
\newcommand{\Diag}{\operatorname{Diag}}
\newcommand{\Sp}{\operatorname{Sp}}
\newcommand{\GL}{\operatorname{GL}}
\newcommand{\T}{\operatorname{(T)}}


% Insert the name of "your journal" with
% \journalname{myjournal}
%

%\spnewtheorem{main}{Theorem}[section]{\bfseries}{\itshape}
%\renewcommand{\themain}{\arabic{section}.\arabic{main}}

%\spnewtheorem{thm}{Theorem}[section]{\bfseries}{\itshape}
%\renewcommand{\thethm}{\arabic{section}.\arabic{thm}}


\spnewtheorem{theorem}{Theorem}{\bfseries}{\itshape}
\renewcommand{\thetheorem}{\arabic{section}.\arabic{theorem}}

\spnewtheorem{corollary}{Corollary}{\bfseries}{\itshape}
\renewcommand{\thecorollary}{\arabic{section}.\arabic{corollary}}

\spnewtheorem{lemma}{Lemma}{\bfseries}{\itshape}
\renewcommand{\thelemma}{\arabic{section}.\arabic{lemma}}

\spnewtheorem{proposition}{Proposition}{\bfseries}{\itshape}
\renewcommand{\theproposition}{\arabic{section}.\arabic{proposition}}

我曾尝试过

\spnewtheorem{proposition}[theorem]{Proposition}{\bfseries}{\itshape}

但这并不能解决问题。有什么想法吗?

我也尝试过制作一个新的计数器,但这也没有解决问题

答案1

您可以通过在序言中添加以下说明来实现格式化目标:

\let\corollary\relax
\let\lemma\relax
\let\proposition\relax
\spnewtheorem{corollary}[theorem]{Corollary}{\bfseries}{\itshape}
\spnewtheorem{lemma}[theorem]{Lemma}{\bfseries}{\itshape}
\spnewtheorem{proposition}[theorem]{Proposition}{\bfseries}{\itshape}
\counterwithin{theorem}{section}

前三条指令用于取消定义corollarylemmaproposition环境。接下来的三条指令重新创建这些环境,这次它们的计数器与环境theorem的计数器绑定theorem。最后一条指令使theorem计数器从属于计数器section。由于其他三个类定理环境的计数器与计数器绑定theorem,因此它们也将从属于计数器section


这是一个 MWE(最小工作示例):

在此处输入图片描述

\documentclass[smallextended]{svjour3}  
\usepackage[hmargin=1.15in, bottom=0.6in, includefoot]{geometry}

\smartqed  % flush-right qed marks, e.g. at end of proof
\usepackage{graphicx}
\usepackage[misc]{ifsym}
\usepackage[utf8]{inputenc}
\usepackage{mathtools,bm,amssymb,dsfont,mathrsfs}
\usepackage{mathpazo}
\usepackage{array,xcolor}
\usepackage[bottom]{footmisc}
\usepackage{abstract,indentfirst,makeidx}
\usepackage{tikz}
\usepackage{xurl}
\usepackage{hyperref}

\let\corollary\relax
\let\lemma\relax
\let\proposition\relax
\spnewtheorem{corollary}[theorem]{Corollary}{\bfseries}{\itshape}
\spnewtheorem{lemma}[theorem]{Lemma}{\bfseries}{\itshape}
\spnewtheorem{proposition}[theorem]{Proposition}{\bfseries}{\itshape}
\counterwithin{theorem}{section}


\begin{document}
\setcounter{section}{2} % just for this example
\begin{theorem} bla bla \end{theorem}
\begin{corollary} bla bla \end{corollary}
\begin{lemma} bla bla \end{lemma}
\begin{proposition} bla bla \end{proposition}
\end{document}

相关内容