我怎样才能对我的定理之后的后续结果进行编号?

我怎样才能对我的定理之后的后续结果进行编号?

我试图在定理之后对定理结果进行编号,即定理 1 后跟结果 1.1、结果 1.2……定理 2 后跟结果 2.1、结果 2.2 等等,其中“结果”后的第一个数字是结果对应的定理的编号。我在 beamer 中执行此操作。我使用的是 amsthm 包,我的代码如下:

      \theoremstyle{theorem}
\newtheorem{thm}{Theorem}[section]
\theoremstyle{theorem}
\newtheorem{res}{Result}[section]

谢谢你!

编辑:正如 tohec 所建议的,这里有一个工作示例:

\documentclass{beamer}
\usepackage[ labelfont={bf, color =ot}]{caption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{tikz-cd}
\usepackage{relsize}
\usepackage{amsthm}
\usepackage{esdiff}
\usepackage{amsthm}

\setbeamertemplate{theorems}[numbered]

\theoremstyle{theorem}
\newtheorem{thm}{Theorem}
\theoremstyle{theorem}
\newtheorem{res}{Result}

\begin{document}

\begin{frame}

\begin{thm}Here lies the first theorem.\end{thm}

\begin{res}Here lies the first result from the first theorem\end{res}

\begin{res}Here lies the second result from the first theorem\end{res}

\begin{thm}Here lies the second theorem.\end{thm}

\begin{res}Here lies the first result from the second theorem\end{res}

\end{frame}
\end{document}

这是我得到的:

图像

Beamer 对我的定理按连续顺序编号,对我的结果按连续顺序编号,它们之间没有任何关系。以下是我想要的:

定理 1 这里是第一个定理。

结果 1.1 这是第一定理的第一个结果。

结果 1.2 这是第一条定理的第二个结果。

定理 2 这里是第二定理。

结果 2.1 这是第二定理的第一个结果。

答案1

您需要告知{res}从中进行子编号{thm},这是通过在末尾添加的可选参数完成的\newtheorem

\newtheorem{res}{Result}[thm]

嵌入到 MWE 中:

\documentclass{beamer}
\usepackage[ labelfont={bf, color =ot}]{caption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{tikz-cd}
\usepackage{relsize}
\usepackage{amsthm}
\usepackage{esdiff}
\usepackage{amsthm}

\setbeamertemplate{theorems}[numbered]

\theoremstyle{theorem}
\newtheorem{thm}{Theorem}
\theoremstyle{theorem}
\newtheorem{res}{Result}

\begin{document}

\begin{frame}

\begin{thm}Here lies the first theorem.\end{thm}

\begin{res}Here lies the first result from the first theorem\end{res}

\begin{res}Here lies the second result from the first theorem\end{res}

\begin{thm}Here lies the second theorem.\end{thm}

\begin{res}Here lies the first result from the second theorem\end{res}

\end{frame}
\end{document}

相关内容