![用小节号对定理进行编号。thm-number,不带章节号](https://linux22.com/image/474975/%E7%94%A8%E5%B0%8F%E8%8A%82%E5%8F%B7%E5%AF%B9%E5%AE%9A%E7%90%86%E8%BF%9B%E8%A1%8C%E7%BC%96%E5%8F%B7%E3%80%82thm-number%EF%BC%8C%E4%B8%8D%E5%B8%A6%E7%AB%A0%E8%8A%82%E5%8F%B7.png)
如果定理是第 x 节(某章)中的第 y 个编号,我希望在报告中用 xy 对该定理进行编号,而不使用章节编号。换句话说,我希望该定理按 进行编号\newtheorem{theorem}{Theorem}[section]
,但不使用章节编号。我知道这可能很容易,而且有一些重复,但我没有找到任何重复。
这是我希望的一个例子,每个定理的内容就是我所规划的数字应该是什么样的。
\documentclass{report}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\chapter{chapter 1}
\section{section 1.1}
\begin{theorem}
I hope this will be thm 1.1.
\end{theorem}
\subsection{A}
\begin{theorem}
I hope this will be thm 1.2.
\end{theorem}
\section{1.2}
\begin{theorem}
Theorem 2.1.
\end{theorem}
\chapter{chapter 2}
\section{section 2.1}
\begin{theorem}
Theorem 1.1.
\end{theorem}
\end{document}
答案1
您可以执行类似操作https://tex.stackexchange.com/a/16283/277964\arabic{section}.
,但在计数器前添加例如theorem
:
\documentclass{report}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\renewcommand*{\thetheorem}{\arabic{section}.\arabic{theorem}}
\begin{document}
\chapter{chapter 1}
\section{section 1.1}
\begin{theorem}
I hope this will be thm 1.1.
\end{theorem}
\subsection{A}
\begin{theorem}
I hope this will be thm 1.2.
\end{theorem}
\section{1.2}
\begin{theorem}
Theorem 2.1.
\end{theorem}
\chapter{chapter 2}
\section{section 2.1}
\begin{theorem}
Theorem 1.1.
\end{theorem}
\end{document}