2

I want my theorems, lemmas, etc to be counted in the following way with section included:

Theorem 2.1
Lemma 2.2
Proposition 2.3
Corollary 3.4

etc

Here are my imports for my document, which uses the svjour3 class.

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

i have tried doing

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

but this doesn't fix the issue. Any ideas?

I have also tried making a new counter but this hasn't fixed the issue either

2
  • 1
    Welcome to TeX.SE.
    – Mico
    Sep 14 '20 at 17:14
  • 1
    @Mico thanks for welcoming me!
    – ADA
    Sep 14 '20 at 17:17
2

You may achieve your formatting objective by adding the following instructions to the preamble:

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

The first three instructions serve to undefine the corollary, lemma, and proposition environments. The next three instructions re-create these environments, this time with their counters tied to theorem, the counter of the theorem environment. The final instruction subordinates the theorem counter to the section counter. Since the counters of the other three theorem-like environments are tied to the theorem counter, they too will be subordinated to the section counter.


Here's an MWE (minimum working example):

enter image description here

\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}
2
  • 1
    cheers mate! thank you very much!
    – ADA
    Sep 14 '20 at 18:13
  • 1
    @ADA - You're most welcome!
    – Mico
    Sep 14 '20 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.