美文网首页
10 添加数学表达式

10 添加数学表达式

作者: 亦是旅人呐 | 来源:发表于2021-10-07 00:45 被阅读0次

    LaTeX的主要优点之一是可以轻松地写出数学表达式。LaTeX允许两种编写数学表达式的模式: 内联模式和显示模式。第一个是用来写作为文本一部分的公式。第二种是用来写不属于文本或段落的表达式,因此放在单独的行中。

    让我们看一个内联模式的例子:

    In physics, the mass-energy equivalence is stated 
    by the equation $E=mc^2$, discovered in 1905 by Albert Einstein.
    

    要使你的方程处于内联模式,请使用下列分隔符之一:

    \(…\), $……$, \begin{math}…{math}结束。它们都有效,选择是一个品味问题。
    ($……$估计顺手一点,两眼发光的感觉)

    显示模式有两个版本:编号和未编号。

    The mass-energy equivalence is described by the famous equation
    \[ E=mc^2 \]
    discovered in 1905 by Albert Einstein. 
    In natural units ($c = 1$), the formula expresses the identity
    \begin{equation}
    E=m
    \end{equation}
    

    要在显示模式下打印方程,请使用以下分隔符之一:
    \[…\], \{displaymath}……\end{displaymath}或者\begin{equation}…\end{equation}。

    不建议使用$$……$$,因为它可能会给出不一致的间距,并且可能不适用于某些数学包。

    注意:等式*环境是由外部包提供的,请参阅amsmath article

    许多数学模式命令需要amsmath包,所以在编写数学时一定要包含它。下面显示了一些基本数学模式命令的示例。

    Subscripts in math mode are written as $a_b$ and superscripts are written as $a^b$. These can be combined an nested to write expressions such as
    
    \[ T^{i_1 i_2 \dots i_p}_{j_1 j_2 \dots j_q} = T(x^{i_1},\dots,x^{i_p},e_{j_1},\dots,e_{j_q}) \]
     
    We write integrals using $\int$ and fractions using $\frac{a}{b}$. Limits are placed on integrals using superscripts and subscripts:
    
    \[ \int_0^1 \frac{dx}{e^x} =  \frac{e-1}{e} \]
    
    Lower case Greek letters are written as $\omega$ $\delta$ etc. while upper case Greek letters are written as $\Omega$ $\Delta$.
    
    Mathematical operators are prefixed with a backslash as $\sin(\beta)$, $\cos(\alpha)$, $\log(x)$ etc.
    

    LATEX中数学的可能性是无穷无尽的,不可能在这里全部列出。一定要看看我们其他的文章


    相关文章

      网友评论

          本文标题:10 添加数学表达式

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