2月20日更
第十节:LaTeX数学公式的多行公式
这节课讲了数学公式的多行公式,就是对前面equation的扩展,即讲了其他几种有关数学公式的环境,依旧提到了编号的问题。 *{开头的头文件不能忘加了}
\documentclass{ctexart}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{gather} %实现多行命令
a+b=b+a \\ %实现换行,并且自动编号
a \times b=b \times a
\end{gather}
\begin{gather*}
4+5=5+4=9 \\
2 \times 8=8 \times 2
\end{gather*}
\begin{gather} %通过\notag阻止编号
3^2+4^2=5^2 \notag \\
5^2+12^2=13^2 \\
a^2+b^2=c^2
\end{gather}
%align环境,用&对齐,在&的右边对齐
\begin{align}
x &=t+\cos t+1 \\
y &=2\sin t
\end{align}
\begin{align*}
x &=t & x &= \cos t & x &= t\\
y &=t^2 & y &= \sin t & y &= t
\end{align*}
\begin{equation}
\begin{split} %对齐方式和align一样,编号在中间
\cos 2x &= \