# Problem with numbering theorem by section

I am having a problem with the numbering of the theorems (by section) in a paper. My problem is that I want to number my theorems and propositions such that they appear as something like:

Theorem 3.1, Proposition 3.1 etc.

However, using the current list of commands I have, I am getting the following:

Theorem 31, Proposition 31 etc.

It seems like at least for the theorem command that I have put in, it is the usual command to call when trying to number theorems by section, so I am a little stumped why I am getting this error.

Here is my list of packages and commands:

\documentclass[smallextended,referee]{svjour3}

\smartqed

\usepackage{graphicx}
\usepackage{epstopdf}% To incorporate .eps illustrations using PDFLaTeX, etc.
\usepackage{subfigure}% Support for small, sub' figures and tables
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amscd}
\usepackage{epsfig}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{color}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[theorem]{Corollary}
\newtheorem{lem}[theorem]{Lemma}
\newtheorem{ntn}{Notations}[section]
\newtheorem{pro}{Proposition}[section]
\newtheorem{dfn}{Definition}[section]
\newtheorem{as}{Assumption}[section]
\newtheorem{rem}{Remark}[section]
\newtheorem{ob}{Observation}[section]

\renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\def\div{\mathop{\rm div}}
\def\D{\mathop{\bf \rm D}}
\def\FP{\mathop{\rm p}}
\def\Span{\mathop{\rm Span}}
\def\boldalpha{\mbox{\boldmath $\alpha$}}
\def\boldpi{\mbox{\boldmath $\pi$}}
\def\boldzeta{\mbox{\boldmath $\zeta$}}
\def\boldtheta{\mbox{\boldmath $\theta$}}

\begin{document}

\section{Solution}\label{Solution}

\begin{lem}\label{conditions}
Words for lemma
\end{lem}

\begin{thm}\label{mainthm}
Words for theorem
\end{thm}

\begin{rem}\label{remone}
Words for remark
\end{rem}

\section{Analysis}\label{Analysis}

\begin{pro}\label{observation}
Words for proposition
\end{pro}

\begin{rem}\label{remtwo}
Words for remark
\end{rem}

\begin{thm}\label{secondthm}
Words for remark
\end{thm}

\begin{pro}\label{proposition}
Words for proposition
\end{pro}

\end{document}

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Apr 7 '15 at 21:45
• This 'document' does not compile even after editing... – user31729 Apr 7 '15 at 22:20
• You should use \spnewtheorem and not \newtheorem. – egreg Apr 7 '15 at 22:49
• Sorry, edited the document so that there is (hopefully) compilable code – Jung Lim. Koo Apr 8 '15 at 4:06
• Your code shows the use of svjour3 and amsthm, and when I compile I receive an error (from amsthm) that the proof environment (or \proof, to be specific) is already defined. I would assume therefore that the class is not compatible with amsthm by default. – Werner Apr 8 '15 at 4:46

Theorem-like environments should be defined, with the svjour3 class, by using

\spnewtheorem


and not \newtheorem. Here's how you should do:

\documentclass[smallextended,referee,envcountsect]{svjour3}

\usepackage{amsmath}
\usepackage{bm}

\smartqed
\journalname{foo}

% Theorem-like environments are defined with \spnewtheorem
%
% Usage:
%
%     \spnewtheorem{env_nam}{caption}[within]{cap_font}{body_font}
% or  \spnewtheorem{env_nam}[numbered_like]{caption}{cap_font}{body_font}
% or  \spnewtheorem*{env_nam}{caption}{cap_font}{body_font}

\spnewtheorem{thm}{Theorem}[section]{\bfseries}{\itshape}
\spnewtheorem{cor}[theorem]{Corollary}{\bfseries}{\itshape}
\spnewtheorem{lem}[theorem]{Lemma}{\bfseries}{\itshape}
\spnewtheorem{ntn}{Notations}[section]{\bfseries}{\itshape}
\spnewtheorem{pro}{Proposition}[section]{\bfseries}{\itshape}
\spnewtheorem{dfn}{Definition}[section]{\bfseries}{\itshape}% maybe \upshape?
\spnewtheorem{as}{Assumption}[section]{\bfseries}{\itshape}
\spnewtheorem{rem}{Remark}[section]{\bfseries}{\itshape}
\spnewtheorem{ob}{Observation}[section]{\bfseries}{\itshape}

\DeclareMathOperator{\Div}{div} % \div is already defined
\DeclareMathOperator{\D}{\mathbf{D}}
\DeclareMathOperator{\FP}{p}
\DeclareMathOperator{\Span}{Span}

\newcommand{\boldalpha}{\bm{\alpha}}
\newcommand{\boldpi}{\bm{\pi}}
\newcommand{\boldzeta}{\bm{\zeta}}
\newcommand\boldtheta{\bm{\theta}}

\begin{document}

\section{Solution}\label{Solution}

\begin{lem}\label{conditions}
Words for lemma
\end{lem}

\begin{thm}\label{mainthm}
Words for theorem
\end{thm}

\begin{rem}\label{remone}
Words for remark
\end{rem}

\section{Analysis}\label{Analysis}

\begin{pro}\label{observation}
Words for proposition
\end{pro}

\begin{rem}\label{remtwo}
Words for remark
\end{rem}

\begin{thm}\label{secondthm}
Words for remark
\end{thm}

\begin{pro}\label{proposition}
Words for proposition
\end{pro}

\end{document}


Note that I left only the packages necessary for the example to run. Note also how I redefined your personal commands, in the correct way: in particular, don't redefine commands you don't know about (\div, in this case).

About the packages you load in the example:

• amsfonts is already loaded by amssymb
• amsthm is not compatible with svjour3
• epsfig must not be loaded in new document (it's just for back compatibility)
• subfigure has been obsolete for 10+ years, call

\usepackage[caption=false]{subfig}


instead; the \subfigure command becomes \subfloat.

About the theorem numbering: having separate counters for all kinds of statements is unnecessarily confusing for the reader, who will have hard times in finding the statements when referenced at: is lemma 1.1 before or after proposition 1.1?

• Thank you, and everybody very much! The answers were all very helpful. – Jung Lim. Koo Apr 9 '15 at 16:48

Actually I have tried the solution of egreg's, and then find out that you don't need to create the command \spnewtheorem{xx}{XX}[section]

It is the option envcountsect in the svjour3 class that really helps.

\documentclass[envcountsect]{svjour3}


If you look into the file svjour.cls, and seach \spnewtheorem{theorem}{Theorem}, around line 888, you would find things like @envcntsect is prerequisite of the numbering by section.

And then, you just use

\begin{theorem}

• I like to have all theorem-like macros numbered in one sequence (for example: Definition 1.1, Lemma 1.2, Theorem 1.3). For that I added the envcountsame option: \documentclass[smallextended,envcountsect,envcountsame]{svjour3}. – Hew Wolff Apr 26 '16 at 3:44
You should use \documentclass[natbib,smallextended, envcountsect]{svjour3}`