1

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}

trisct
  • 207

0 Answers0