简体   繁体   中英

Repeated numbering for new commands for Theorem, Corollary and Remark

I have the following code in latex

\documentclass[letterpaper,12pt,oneside]{book}

\newtheorem{Theorem}{Theorem}[section]
\newtheorem{Proposition}{Proposition}[section]
\newtheorem{Lemma}{Lemma}[section]
\newtheorem{Definition}{Definition}[section]
\newtheorem{Corollary}{Corollary}[section]
\newtheorem{Remark}{Remark}[section]

I want the numbering to increase with each newtheorem defined that I use.

For example, in chapter 2 there are Lemma 2.1.1, Remark 2.1.1 and Theorem 2.1.1, and they appear in this order. Instead, I would like it to be numbered as Lemma 2.1.1, Remark 2.1.2 and Theorem 2.1.3.

I have tried to put [subsection] at the end of the \\newtheorem lines, but it does not fixes the problem.

Does anyone knows how to solve this, please?

Instead of using the form

\newtheorem{Proposition}{Proposition}[section]

you must use the alternative form

\newtheorem{Proposition}[Theorem]{Proposition}

While the former tells to number a theorem-like environment within a section, the latter tells to reuse the counter already defined in the Theorem environment.

So you must use the first form for the declaration of Theorem and the second one for the others to reuse Theorem numbering.

\documentclass[letterpaper,12pt,oneside]{book}

\newtheorem{Theorem}{Theorem}[section]
\newtheorem{Proposition}[Theorem]{Proposition}
\newtheorem{Lemma}[Theorem]{Lemma}
\newtheorem{Definition}[Theorem]{Definition}
\newtheorem{Corollary}[Theorem]{Corollary}
\newtheorem{Remark}[Theorem]{Remark}

\begin{document}
\chapter{Testing newtheorem numbering}
\section{This is a section}
\begin{Theorem}
  This is a Theorem
\end{Theorem}
\begin{Proposition}
  This is a Proposition
\end{Proposition}
\begin{Lemma}
  This is a Lemma
\end{Lemma}
\begin{Definition}
  This is a Definition
\end{Definition}
\begin{Remark}
  One can remark the correct numbering.
\end{Remark}
\end{document}

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM