l一般的atex 的定理环境, amsmath 安装包自带,用法为:
\newtheorem {环境名} {标题} [排序单位]
[排序单位] 一般为 chapter,若带上 chapter 则表示 定理按章节编号。
下列代码放入导言区:
\usepackage{amsmath}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proof}{Proof}[section]
使用时:
\section{theorem}
\begin{theorem}
This is a theorem.
\end{theorem}
\begin{lemma}
This is a lemma.
\end{lemma}
\section{Proof}
\begin{proof}
This is proof.
\end{proof}
显示效果:
但若要更加精细的定理环境,例如修改编号,修改间距等,则需要安装包 ntheorem
- 若取消定理类环境的编号,则在定理类环境时,加上星号。
\newtheorem*{lemma}{Lemma}
\begin{lemma}
This is a lemma.
\end{lemma}
- 改变排版格式
\theoremheaderfont { 字体命令} 改变标题字体
\theorembodyfont{ 字体命令} 改变定理内正文字体
\theoremindent 左缩进宽度
\qedsymbol{结束符〉和