0
\documentclass[12pt,reqno,a4paper]{amsart}
%\usepackage[utf8]{inputenc} % not needed with up-to-date TeX systems
\usepackage[english]{babel}

\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{color}
\usepackage{lineno}
\usepackage{mathrsfs}
\usepackage[all]{xy}
\usepackage{tikz-cd}
\usepackage[normalem]{ulem} % do you *really* need it?
\usepackage{datetime}

\usepackage{hyperref}

\theoremstyle{definition}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{construction}{Construction}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{example}{Example}[section]
\newtheorem*{question}{Question}
\newtheorem*{solution}{Solution}
\newtheorem{exercise}{Exercise} 

\newcommand{\mc}{\mathcal}
\newcommand{\mf}{\mathfrak}
\newcommand{\xra}{\xrightarrow}
\newcommand{\ra}{\rightarrow}

\pagestyle{myheadings}

\textheight 9.3in 
\textwidth 6.5in
\calclayout

% metadata

%\date{\today}

\title{***}
\author{***} 

\begin{document}

\end{document}

This is the minimal working example.

In this I am getting Definition 2.1, Lemma 2.1, Corollary 2.1

I am looking for a set counter that gives Definition 2.1, Lemma 2.2.

How do I change the code accordingly?

The following code

\numberwithin{equation}{section}
\newtheorem{The}[equation]{Theorem}
\newtheorem{Dfn}[equation]{Definition}
\newtheorem{Lem}[equation]{Lemma}
\newtheorem{Prs}[equation]{Proposition}
\newtheorem{Crl}[equation]{Corollary}
\newtheorem{Rmk}[equation]{Remark}

suggested by Mico is giving numbers which includes equations as well. I only want number sequence for theorem, lemma, proposition, corolalry etc but not equations.

  • For example, replace \newtheorem{lemma}{Lemma}[section] by \newtheorem{lemma}[definition]{Lemma} so Lemma will use the same counter as Definition – Sigur Mar 30 at 16:23
  • The answer is contained in an answer I posted on an earlier question of yours. – Mico Mar 30 at 16:24
  • Potential duplicate: Theorem/Definition/Lemma problem — Numbering – barbara beeton Mar 30 at 16:26
  • Remove [equation] from \newtheorem{The}[equation]{Theorem} and instead place [section at the end: \newtheorem{The}{Theorem}[section]. Then replace [equation] by [The] for all the other theorem-class objects. Read the user's guide for amsthm (texdoc amsthdoc); the numbering strategy is thoroughly explained there. – barbara beeton Mar 30 at 17:46
  • 1
    This is really a duplicate, and I'll try to find a good link. But I'll post an answer for general convenience. – barbara beeton Mar 30 at 17:56
4

The canonical numbering structure of theorem-class objects in amsthm is the following:

\newtheorem{<env name>}{<text>}[<parent counter>]
\newtheorem{<env name>}[<shared counter>]{<text>}

(This is very well explained in the user manual -- texdoc amsthdoc; this manual is included in TeX Live along with amsthm.)

The example in this question shows theorem-class objects numbered along with equations, but what is wanted is for them to be numbered with the same counter within sections. Therefore, the definitions should be changed as follows:

\newtheorem{The}{Theorem}[section]
\newtheorem{Dfn}[The]{Definition}
\newtheorem{Lem}[The]{Lemma}

etc.

| improve this answer | |

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