我有以下文件:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{rem}[thm]{Remark}
\newtheorem{proof}{Proof}
\numberwithin{equation}{section}
\begin{document}
\section{Section 1}
\begin{thm}
Theorem.
\end{thm}
\begin{rem}
Remark.
\end{rem}
\begin{lem}
Lemma
\end{lem}
\begin{prop}
Proposition.
\end{prop}
\begin{cor}
Corollary.
\end{cor}
\begin{defn}
Definition.
\end{defn}
\begin{thm}
Theorem.
\end{thm}
\begin{proof}
Proof.
\end{proof}
\end{document}
其规定如下:
如何\textit
从证明内容(在我的例子中是:这里的一些证明)中删除定义和备注?我尝试更改命令,\newtheorem
但没有成功。
答案1
只需加载amsthm
并用于\theoremstyle{definition}
您不想要斜体的环境即可。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{rem}[thm]{Remark}
%\newtheorem{proof}{Proof}
\numberwithin{equation}{section}
\begin{document}
\section{Section 1}
\begin{thm}
Theorem.
\end{thm}
\begin{rem}
Remark.
\end{rem}
\begin{lem}
Lemma
\end{lem}
\begin{prop}
Proposition.
\end{prop}
\begin{cor}
Corollary.
\end{cor}
\begin{defn}
Definition.
\end{defn}
\begin{thm}
Theorem.
\end{thm}
\begin{proof}
Proof.
\end{proof}
\end{document}
答案2
(在意识到 OP 只想更改少数(但不是全部)类定理环境的正文字体后,我修改了我的答案。)
我建议你加载定理\theorembodyfont{\upshape}
打包并在 之前发出指令\newtheorem{defn}[thm]{Definition}
。这样,只有最后三个\newtheorem
声明会受到字体更改的影响。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb} % 'amssymb' loads 'amsfonts' automatically
\usepackage{ntheorem} % for '\theorembodyfont' macro
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\theorembodyfont{\upshape}
\newtheorem{defn}[thm]{Definition}
\newtheorem{rem}[thm]{Remark}
\newtheorem{proof}{Proof}
\begin{document}
\section{Introduction}
\begin{thm} Theorem. \end{thm}
\begin{rem} Remark. \end{rem}
\begin{lem} Lemma. \end{lem}
\begin{prop} Proposition. \end{prop}
\begin{cor} Corollary. \end{cor}
\begin{defn} Definition. \end{defn}
\begin{thm} Theorem. \end{thm}
\begin{proof} Proof. \end{proof}
\end{document}