LaTeX技巧774:amsthm证明环境结束符的使用技巧

您所在的位置:网站首页 黑色的方块怎么打 LaTeX技巧774:amsthm证明环境结束符的使用技巧

LaTeX技巧774:amsthm证明环境结束符的使用技巧

2024-07-17 13:40| 来源: 网络整理| 查看: 265

amsthm提供了默认的proof环境,通常较为常用的用法如下: 方式一:当证明环境结束是文本时,直接使用proof环境即可:

\begin{proof} The proof of the theorem. \end{proof} 注:proof的结束符是\qed,在非证明环境中,也是可以使用的,如: Outside of a proof, \verb+\qed+ works at the end of a text line. \qed 方式二:当证明环境结束的地方是行间公式时,需要如下使用: \begin{proof} This is now proved by \begin{equation*} a + b = c \qedhere \end{equation*} \end{proof} 这一方式遇到下面的问题: qedhere20140426003231   我们可以定义如下 \newcommand{\xqedhere}[2]{% \rlap{\hbox to#1{\hfil\llap{\ensuremath{#2}}}}} 第一个参数可以看成是公式到结束符之间的距离,第二个参数是结束符的符号,这样我们就可以把方块放在公式的最后一行。 xqedhere20140426011000     代码如下: \begin{proof} This display uses \verb+\xqedhere+ to manually place the box on the last line of the display: \begin{equation*} x + y = \begin{cases} -1 & \text{if } x < 2,\\ 0 & \text{if } x = 2,\\ 1 & \text{if } x > 2.\xqedhere{118.5pt}{\qed} \end{cases} \end{equation*} \end{proof} 这一命令可以非常简单变换我们的结束符号。 如: $$ d + e = f \xqedhere{5.3cm}{\lozenge} $$ 样例如下: qed-proof


【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3