定理、分段、反证

定理、分段、反证

我只想获取这张照片的第二部分

定理证明

它的代码如下:

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{thmtools}
\usepackage{amsmath}
\usepackage{chngcntr}

\newcommand{\newsubsectheorem}[2]{%
  \newtheorem{#1}{#2}[subsection]%
  \counterwithin{#1}{subsection}}

\newsubsectheorem{theorem}{Theorem}
\newsubsectheorem{proposition}{Proposition}
\newsubsectheorem{lemma}{Lemma}
\begin{document}

\chapter{Theorem Proof}
\section{Introduction}
See these Theorems:
\subsection{These Theorems}
\newsubsectheorem{First}{First Theorem}
\begin{First}
Theorem with Its Proof.
\end{First}
\newsubsectheorem{Second}{Second Theorem}
\begin{Second}
Theorem with Its Proof.
\end{Second}
\hrule
\setcounter{subsection}{0}
\subsection{These Theorems}
\textbf{First Theorem 1.1.1.1} \textit{Theorem with Its Proof.}\vspace{3mm}\\
\textbf{Second Theorem 1.1.1.2} \textit{Theorem with Its Proof.}
\end{document}

我希望你能帮助我,非常感谢

答案1

我不确定您是否希望根据小节编号对定理进行一般编号,因为这需要对文档进行非常严格的细分,并且会导致引用不方便。我希望您真的不想独立于定理对命题和引理进行编号。

无论如何,下面的代码应该是你想要的。

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{thmtools}
\usepackage{amsmath}

\newtheorem{theorem}{Theorem}[subsection]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}

\newcommand{\namedtheoremname}{}
\newtheorem{namedtheoreminner}[theorem]{\protect\namedtheoremname}
\newenvironment{namedtheorem}[1]
 {%
  \renewcommand{\namedtheoremname}{#1}%
  \begin{namedtheoreminner}%
 }
 {\end{namedtheoreminner}}

\begin{document}

\chapter{Theorem Proof}

\section{Introduction}
See these Theorems:

\subsection{These Theorems}

\begin{namedtheorem}{First Theorem}
Theorem with Its Proof.
\end{namedtheorem}

\begin{namedtheorem}{Second Theorem}
Theorem with Its Proof.
\end{namedtheorem}

\subsection{Another}

\begin{theorem}
Theorem with Its Proof.
\end{theorem}

\end{document}

在此处输入图片描述

我也不确定为什么thmtools在不使用它的任何功能的情况下进行加载。

相关内容