[Tex/LaTex] Defining shared counters for theorem environments *after* environments are defined

countersenvironmentsnumberingsv-classes

I am trying to use the same numbering for theorems, propositions, definitions, etc. This is normally easily be solved by using amsmath and defining these environments and using the same counter:

\newtheorem{theorem}{Theorem}[section]  
\newtheorem{proposition}[theorem]{Proposition} 

Problem: I am using a journal document class which has theorems, propositions, definitions, etc. already defined in the document class. Thus I need to change the counter after the environments were already defined, something similar to the way one can simply change the numbering format with:

\renewcommand{\theprop}{\arabic{section}.\arabic{prop}} 

In my case, the document class is:

\documentclass[twocolumn]{svjour3}     

Just found the very simple solution inspired from How to identify the counter of Equation, Theorem, and Section. The solution is to match the counters:

\makeatletter
\let\c@proposition\c@theorem
\let\c@corollary\c@theorem
\let\c@lemma\c@theorem
\let\c@definition\c@theorem
\let\c@example\c@theorem
\makeatother

Best Answer

The definition of these environments in svjour3 are actually initiated using a "special theorem macro" that just receives a bunch of formatting (plus counter and name) information from the respective environments. Originally, theorem, proposition and definition are defined like this:

> \theorem=macro:
->\@spthm {theorem}{\csname theoremname\endcsname }{\bfseries }{\itshape }.

> \proposition=macro:
->\@spthm {proposition}{\csname propositionname\endcsname }{\bfseries }{\itshape }.

> \definition=macro:
->\@spthm {definition}{\csname definitionname\endcsname }{\bfseries }{\rmfamily }.

All you need to do is make the proposition and definition environment starting macros to resemble that of theorem:

enter image description here

\documentclass[twocolumn]{svjour3}% http://www.e-publications.org/springer/support/spr-chicago.html
\makeatletter
\def\proposition{\@spthm{theorem}{\csname propositionname\endcsname}{\bfseries}{\itshape}}
\def\definition{\@spthm{theorem}{\csname definitionname\endcsname}{\bfseries}{\itshape}}
\makeatother
\begin{document}
\begin{theorem}This is a theorem.\end{theorem}
\begin{proposition}This is a proposition.\end{proposition}
\begin{definition}This is a definition.\end{definition}
\begin{theorem}This is a theorem.\end{theorem}
\begin{proposition}This is a proposition.\end{proposition}
\begin{definition}This is a definition.\end{definition}
\end{document}
Related Question