新浪博客

LaTeX中设置定理编号、排版格式、 自定义proof【转】

2017-10-15 20:20阅读:
l一般的atex 的定理环境, amsmath 安装包自带,用法为:
ewtheorem {环境名} {标题} [排序单位]
[排序单位] 一般为 chapter,若带上 chapter 则表示 定理按章节编号。
下列代码放入导言区:

[plain] view plain copy
  1. \usepackage{amsmath}
  2. ewtheorem{theorem}{Theorem}
  3. ewtheorem{lemma}{Lemma}
  4. ewtheorem{proof}{Proof}[section]


使用时:

[plain] view plain copy
    \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. 若取消定理类环境的编号,则在定理类环境时,加上星号。

      [plain] view plain copy
    1. ewtheorem*{lemma}{Lemma}
    2. \begin{lemma}
    3. This is a lemma.
    4. \end{lemma}


    显示效果:
    2. 改变排版格式
    \theoremheaderfont { 字体命令} 改变标题字体
    \theorembodyfont{ 字体命令} 改变定理内正文字体
    \theoremindent 左缩进宽度
    \qedsymbol{结束符〉和\qed 如果希望某个定理类表达式换用其他结束符,可以先用命令\qedsymbol 来定义,然后
    在该表达式中使用命令\qed 将结束符置于右下角。
    \theoremnumbering {计数形式}: 设置序号的计数形式,它的默认值是arabic ,可改为采用alph 、Alph 、rom、Roman 、
    greek 、Greek 、chinese 或fnsymbol 计数形式。
    \theoremstyle {格式〉 有break等命令。break 让 定理与内容隔开。
    举例:

    [plain] view plain copy
    1. \theorembodyfont{\bfseries\upshape}
    2. \theoremseparator{:}
    3. \theoremstyle{break}
    4. ewtheorem{theorem}{Theorem}
    5. ewtheorem{lemma}{Lemma}
    6. ewtheorem{proof}{Proof}[section]
    7. \section{theorem}
    8. \begin{theorem}[introduction]
    9. This is a theorem.
    10. \end{theorem}
    11. \begin{lemma}
    12. This is a lemma.
    13. \end{lemma}
    14. \theorembodyfont{\upshape}
    15. \theorembodyfont{\bf}
    16. \section{Proof}
    17. \begin{proof}
    18. This is proof.
    19. \end{proof}

    显示效果:

    3. 自定义proof 环境
    使用命令: ewenvironment {新环境} {开始定义} {结束定义}
    举例:定义证明环境为 proof 斜体,证明以 方框结束。

    [plain] view plain copy
    1. ewenvironment{proof}{{oindent\it Proof}\quad}{\hfill $\square$\par}

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

    转自:http://blog.csdn.net/robert_chen1988/article/details/61204853

    我的更多文章

    下载客户端阅读体验更佳

    APP专享