latex 定理环境,引理,定义,自定义 proof 环境

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

1.  若取消定理类环境的编号,则在定理类环境时,加上星号。

\newtheorem*{lemma}{Lemma}
\begin{lemma}
This is a lemma.
\end{lemma}

显示效果:

2. 改变排版格式

\theoremheaderfont { 字体命令}    改变标题字体

\theorembodyfont{ 字体命令}   改变定理内正文字体

\theoremindent  左缩进宽度
 

\qedsymbol{结束符〉和\qed  如果希望某个定理类表达式换用其他结束符,可以先用命令\qedsymbol 来定义,然后

在该表达式中使用命令\qed 将结束符置于右下角。

\theoremnumbering {计数形式}: 设置序号的计数形式,它的默认值是arabic ,可改为采用alph 、Alph 、rom、Roman 、

greek 、Greek 、chinese 或fnsymbol 计数形式。

\theoremstyle {格式〉 有break等命令。break 让 定理与内容隔开。

举例:

\theorembodyfont{\bfseries\upshape}
\theoremseparator{:}
\theoremstyle{break}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proof}{Proof}[section]


\section{theorem}

\begin{theorem}[introduction]
This is a theorem.
\end{theorem}

\begin{lemma}
This is a lemma.
\end{lemma}

\theorembodyfont{\upshape}
\theorembodyfont{\bf}
\section{Proof}
\begin{proof}
This is proof.
\end{proof}


显示效果:

3. 自定义proof 环境

这个自定义 proof 比之前的那个更常用。

使用命令: \newenvironment {新环境} {开始定义} {结束定义}

举例:定义证明环境为 proof 斜体,证明以 方框结束。

\newenvironment{proof}{{\noindent\it Proof}\quad}{\hfill $\square$\par}


上面的命令中, \noindent 表示 proof 没有缩进,\it 表示 proof 斜体, \quad 表示 proof 后面空四个空格, \hfill 表示右对齐, \square 表示方框,\par表示结尾空一段

显示效果:

评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

心态与习惯

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值