我如何在定理之後對後續結果進行編號?

我如何在定理之後對後續結果進行編號?

我試著在定理之後對我的定理結果進行編號,即定理 1 後跟結果 1.1、結果 1.2,... 定理 2 後跟結果 2.1、結果 2.2 等等,其中「結果」之後的第一個數字是結果對應的定理編號。我正在投影機中執行此操作。我正在使用 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}

相關內容