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 ofequationenvironment or the contents of one line in a multiple equation structure such asalignorgather.\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\sumfor sum\intfor integral\sin \cosfor sin,cos\sqrtfor square root\cdotfor one dot in the center of text\cdotsfor three dots in the center of text\ldotsfor three dots in the bottom of text\{\}for {}\|for |\text{}for writing text in equation\intertext{}for writing text between multilines
本文深入探讨了amsmath包在数学公式撰写中的应用,包括内联公式、显示公式、多行公式及详细使用技巧。
1万+

被折叠的 条评论
为什么被折叠?



