I have a few self-defined theorem environments:
\newtheorem{lemma}{Lemma}[section]
\newtheorem{prp}{Proposition}[section]
\newtheorem{theom}{Theorem}[section]
\newtheorem{coro}{Corollary}[section]
And when I use two different types of them:
\begin{lemma}
A lemma.
\end{lemma}
\begin{coro}
A corollary.
\end{coro}
The output is like this:
Lemma 1.1. A lemma.
Corollary 1.1. A corollary.
If I am guessing correctly, they are using different copies of the section counter. How can I make them share the same section counter to generate an output like the following? Btw, the documentclass is article and no template is used.
Lemma 1.1. A lemma.
Corollary 1.2. A corollary.
A minimal example:
\documentclass[a4paper,12pt]{article}
\newtheorem{lemma}{Lemma}[section]
\newtheorem{prp}{Proposition}[section]
\newtheorem{theom}{Theorem}[section]
\newtheorem{coro}{Corollary}[section]
\newcommand{\lem}[1]{\begin{lemma}#1\end{lemma}}
\newcommand{\thm}[1]{\begin{theom}#1\end{theom}}
\newcommand{\prop}[1]{\begin{prp}#1\end{prp}}
\newcommand{\cor}[1]{\begin{coro}#1\end{coro}}
\begin{document}
\begin{section}{First section}
\lem{A lemma.}
\cor{A corollary.}
\end{section}
\end{document}
\newtheorem{coro}[lemma]{Corollary}? – Sigur Apr 02 '20 at 00:51reportorarticle? Please, add a minimal code so we can see what you are doing. – Sigur Apr 02 '20 at 00:59\newtheorem{coro}[lemma]{Corollary}and\newtheorem{coro}{Corollary}[lemma]. But what is the difference exactly? – trisct Apr 02 '20 at 01:15coroshould use the same counter aslemmaand the 2nd says that it should use its own counter, but preceded by the counterlemma. – Sigur Apr 02 '20 at 01:17amsthm, the answer is given here: setting counters for Lemmas proposition etc – barbara beeton Apr 02 '20 at 01:20