[Latex] Math Equations

1. amsmath

Since I am from school of mathematics, the most useful package for me is the amsmath, which helps me write beautiful math formulas.

1.1 Inline equations

We can use $...$ to write inline equations. For example

This is first inline equation $\alpha_1 +\beta_1 = \gamma_1$, \(\alpha_2+\beta_2=\gamma_2\)

Result

1.2 Displayed equations

  • Recommended environments
    • \[...\] un-numbered
    • \begin{equation*}...\end{equation*} un-numbered
    • \begin{equation}...\end{equation} numbered automatically
  • Seldom use
    • \begin{math}...\end{math}
    • \begin{displaymath}...\end{displaymath}
  • Not recommended
    • $$...$$
% alternative 1
\[\sqrt{\mu+\delta}=\kappa\]

% alternative 2
\begin{equation*}
  \sqrt{\mu+\delta}=\kappa
\end{equation*}

% alternative 3
\begin{equation}
  \sqrt{\mu+\delta}=\kappa
\end{equation}

1.3 multi-line equations

Alternatives

  • Recommended
    • \begin{split}...\end{split} which is a subordinate environment that can be used as the contents of equation environment or the contents of one line in a multiple equation structure such as align or gather.
    • \begin{multline}...\end{multline} not-aligned
    • \begin{gather}...\end{gather} not-aligned
    • \begin{align}...\end{align} aligned
  • Not recommended
    • \begin{eqnarray*}...\end{eqnarray*} un-numbered
    • \begin{eqnarray}...\end{eqnarray} numbered
    • because they produce inconsistent spacing of the equal signs and make no attempt to prevent overprinting of the equation body and equation number.
% split
\begin{equation}
  \begin{split}
    \xi+\zeta&=\theta\\
    \mu+\phi&=\tau
  \end{split}
\end{equation}

% gather
\begin{gather}
  a+b+c+d+e+f+g+h+j+\\
  k+l+m+n
\end{gather}

% multline
\begin{multline}
  a+b+c+d+e+f+g+h+j+\\
  k+l+m+n
\end{multline}

% align
\begin{align}
  a+b&=c\\
  d+e&=f
\end{align}

1.4 Details

  • -and ^ are not for lower and upper subsripts
  • \sum for sum
  • \int for integral
  • \sin \cos for sin,cos
  • \sqrt for square root
  • \cdot for one dot in the center of text
  • \cdots for three dots in the center of text
  • \ldots for three dots in the bottom of text
  • \{\} for {}
  • \| for |
  • \text{} for writing text in equation
  • \intertext{} for writing text between multilines
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值