 |
在文档中输入数学公式 |
 |
TeXmacs对数学公式有着非常强大的支持。
TeXmacs下有三种输入数学公式的方式:
-
插入\(\rightarrow\)数学\(\rightarrow\)公式或者$
-
这个菜单条目输入的是像\(a^2
+ b^2 =
c^2\)那样嵌在文本段落中的简短公式。注意公式是一种特殊的排版方式,不会占用过多的垂直方向上的空间。比如求和符号的上下界限往往处于右边(\(\sum^n_{i
=
1}\))。此时选中整个数学公式,再在格式\(\rightarrow\)数学\(\rightarrow\)展示风格中选择打开,求和符号的界限就会显示在其上下两侧(\(\displaystyle
\sum^n_{i =
1}\))。缺省情况下,展示风格是关闭的。
-
插入\(\rightarrow\)数学\(\rightarrow\)单行公式或者⌃$
-
这个条目适合输入较长的公式,比如:
\(\displaystyle x^n + y^n = z^n,\)
公式的排版会占据整个段落。使用快捷键⎋#可以给公式加上编号(或者删去编号)。快捷键⌥⇥能够让公式在行内模式和单行模式间切换。
-
插入\(\rightarrow\)数学\(\rightarrow\)多行公式或者⌃&
-
这个条目创建了一个eqnarray\(^{\ast}\),一个三列宽的类似表格的环境(详见创建表格)。在这个环境中可以方便地输入多行公式,比如:
\begin{eqnarray*}
x + 0 & = & x\\
x + (- x) & = & 0\\
x + y
& = & y + x\\
(x + y) + z & = & x + (y + z)
\end{eqnarray*}
第一列右对齐,第二列居中,第三列左对齐。
eqnarray\(^{\ast}\)环境的典型用途就是显示多步计算:
\begin{eqnarray*}
(e^{\sin x} + \sin e^x)' & = & (e^{\sin x})'
+ (\sin e^x)'\\
& = & (\sin x)' e^{\sin x} + (e^x)' \cos e^x\\
& = & e^{\sin x} \cos x + e^x \cos e^x,
\end{eqnarray*}
在这个例子中,大多数行的第一列是空着的。
© 1998–2022 Joris van der Hoeven, 沈达
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
"GNU Free Documentation License".