美文网首页程序员
LaTeX笔记 | 关于 \newtheorem

LaTeX笔记 | 关于 \newtheorem

作者: 埠默笙声 | 来源:发表于2019-10-10 00:54 被阅读0次

    看了百度首页上的一些帖子,要么是没有讲多个数学内容如何组织编号的问题,要么是一些基础的用法说明不够齐整,于是整理了一番,暂时感觉“够用”。

    1

    \newtheorem 是定义 “命题,定理,,定义,引理,假设,说明,证明,推论,例子” 等数学内容的命令。调用时需要引用包:\usepackage{amsthm}
    常用的 “数学内容” :Proposition,Theorem,Definition,Lemma,Assumption,Remark,Proof,Corollary,Example

    2

    该命令不使用参数区分这些数学内容,而是提供了三种显示风格
    \theoremstyle{plain}
    \theoremstyle{definition}
    \theoremstyle{remark}

    3

    每一个数学内容都必须定义一个唯一的 theorem 环境,环境定义在\begin{document}之前:
    \newtheorem{环境名}{数学内容}[section]
    例如 \newtheorem{asm}{Assumption}[section]
    [chapter] [section] [subsection] 指定了该数学内容的编号是按 章/节/小节 命名的。
    在正文中使用\begin{环境名}[名称]... \end{环境名}调用已经定义好的环境。([名称]可缺省)
    例如 \begin{asm}[PE condition] ... \end{asm}

    4

    另一种更为常见的编号方式形如 "Definition 1, Definition 2..." "Assumption 1, Assumption 2...",即同种类型的数学内容共同组成一组编号。因为该命令组不区分数学内容的使用方式,所以我们需要手工组织哪些环境是同组编号的:

    % 管理一组“定理”
    \theoremstyle{definition}
    \newtheorem{theo}{Theorem}
    % 与环境 theo 同组编号 
    \newtheorem{theo2}[theo]{Theorem}
    \newtheorem{theo3}[theo]{Theorem}
     
    % 管理一组“说明”
    \theoremstyle{remark}
    \newtheorem{rmk}{Remark}
    % 与环境 rmk 同组编号
    \newtheorem{rmk2}[rmk]{Remark}
    \newtheorem{rmk3}[rmk]{Remark}
    \newtheorem{rmk4}[rmk]{Remark}
    

    5

    有一些数学内容一般是不需要进行编号的,如Proof,在定义时添加一个星号即可:
    \newtheorem*{prf}{Proof}
    不过,latex自带一个proof环境,在正文中可以直接调用:
    \begin{proof} ... \end{proof}

    小结

    三种显示风格,三种编号方式(注意 [] 的内容、位置)。

    相关文章

      网友评论

        本文标题:LaTeX笔记 | 关于 \newtheorem

        本文链接:https://www.haomeiwen.com/subject/stwnpctx.html