方程式编号

方程式编号

在 tex 文档中,我希望像其他所有文档一样对方程式进行编号。但方程式似乎都有自己的编号。以下是示例:在“备注 4.5”之后紧接着是“方程式 (3)”。我更希望使用“方程式 (4.6)”。

我已经尝试在所有注释、定理、命题等之前添加一个\stepcounter{thm}……但没有成功。有办法解决这个问题吗?

下面附上了我的 tex 文件的第一部分。非常感谢。


\documentclass[a4paper,11pt]{amsart}

\usepackage[utf8]{inputenc}

\usepackage[margin=2.5cm]{geometry}

\usepackage{enumerate, amsmath,amsthm,amssymb,amscd,mathrsfs,hyperref}

\usepackage{colortbl,float,longtable,xcolor,booktabs,bookmark}

\usepackage[all]{xy}

\usepackage[english]{babel}

\usepackage{graphicx,tikz}

\usetikzlibrary{trees}

\usetikzlibrary{arrows}

\newcommand{\V}[1]{\mathcal{V}\!\left({#1}\right)}

\newcommand{\gap}{\hspace{0.5em}}

\newcommand{\vgap}{\vspace{0.25em}}

\newcommand{\padding}{\rule[-1.45ex]{0pt}{0.2em}\gap}

\newcommand{\oddrow}{\rowcolor[gray]{0.95}}

\newcommand{\evnrow}{}

\newlength{\matrixheight}

\newcommand{\calculatepadding}[1]{\settoheight{\matrixheight}{\hbox{#1}}{#1}}

\theoremstyle{plain}

\newtheorem*{thmA}{Theorem A}

\newtheorem*{thmB}{Theorem B}

\newtheorem*{thmC}{Theorem C}

\newtheorem{thm}{Theorem}[section]

\newtheorem{pro}[thm]{Proposition}

\newtheorem{lem}[thm]{Lemma}

\newtheorem{cor}[thm]{Corollary}

\newtheorem{Lemma}[thm]{Lemma}

\newtheorem{Proposition}[thm]{Proposition}

\newtheorem{Corollary}[thm]{Corollary}

\newtheorem{Conjecture}[thm]{Conjecture}

\newtheorem*{thm*}{Theorem}

\newtheorem*{theoremn}{Theorem}

\newtheorem*{conjecturen}{Conjecture}

\newtheorem{Claim}[thm]{Claim}

\theoremstyle{definition}

\newtheorem{dfn}[thm]{Definition}

\newtheorem{claim}[thm]{Claim}

\newtheorem{exa}[thm]{Example}

\newtheorem{prb}[thm]{Problem}

\newtheorem{rem}[thm]{Remark}

\newtheorem{que}[thm]{Question}

\newtheorem{Notation}[thm]{Notation}

\newtheorem{Problem}[thm]{Problem}

\newtheorem{Construction}[thm]{Construction}

\newtheorem{Definition}[thm]{Definition}

\newtheorem{Remark}[thm]{Remark}

\newtheorem{Remarks}[thm]{Remarks}

\newtheorem{Question}[thm]{Question}

\newtheorem{Example}[thm]{Example}

\newtheorem{Assumption}[thm]{Assumptions}

\newtheorem{say}[thm]{}

答案1

我不太明白为什么多次定义类似的环境(claim/ Claimlem/ Lemma),所以这里只是代码的简化版本:

\documentclass{amsart}

\usepackage{amsthm}

\newtheorem{thm}{Theorem}[section]
\newtheorem{pro}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}

\makeatletter
\let\c@equation\c@thm
\makeatother
\numberwithin{equation}{section}

\begin{document}

\section{Foo}
Normal normal normal normal normal normal
\begin{thm}
Theorem theorem theorem theorem theorem
\begin{equation}
a=b
\end{equation}
Theorem theorem theorem theorem theorem theorem
\end{thm}
Normal normal normal normal normal normal
\begin{pro}
Proposition proposition proposition proposition
\end{pro}
Normal normal normal normal normal normal
\begin{equation}
a=b
\end{equation}
Normal normal normal normal normal normal
\begin{lem}
Lemma lemma lemma lemma lemma lemma lemma
\end{lem}

\section{Bar}
Normal normal normal normal normal normal
\begin{thm}
Theorem theorem theorem theorem theorem theorem
\begin{equation}
a=b
\end{equation}
\end{thm}

\end{document}

在此处输入图片描述

相关内容