LatexTexStudio多⾏数学公式排版导⼊宏包\upackage{amsmath}\upackage{amssymb}
⽬录
gather
gather
% 带编号
% gather 实现多⾏排版同时对公式进⾏编号
\begin{gather}
a +
b = b + a \\
abba杨靖宇读后感
\end{gather}
华为桌面gather*
\begin{gather*}
3 + 5 = 5 + 3 = 8 \\
3 \times 5 = 5 \times 3
\end{gather*}唐宋八大家是谁
人生就是一场修行
notag
% 不带编号
% 在 \\ 前使⽤\notag 阻⽌编号
\begin{gather}
3^2 + 4^2 = 5^2 \notag \\
5^2 + 12^2 = 13^2 \notag \\
a^2 + b^2 = c^2
\end{gather}微信附近的人
align
align
% 带编号(⽤ & 对齐),设置公式对齐⽅式
\begin{align}
小儿肛瘘
x &= t + \cos t + 1 \\ % 在=左边对齐
y &= 2\sin t
\end{align}
align*
% 不带编号
\begin{align*}
x &= t & x &= \cos t & x &= t \\
y &= 2t & y &= \sin(t+1) & y &= \sin t
\end{align*}
split
% split将⼀个公式分成多⾏排版蚕姑坨
% split 环境,⼀定要equation环境中(对齐采⽤align环境的⽅式,编号在多个式⼦中间)
\begin{equation}
\begin{split}
\cos 2x &= \cos^2 x - \sin^2 x \\
&= 2\cos^2 x -1
\end{split}
\end{equation}
cas
% cas 环境
% 每⾏公式中使⽤ & 分隔为两部分,
% 通常表⽰值和后⾯的条件
\begin{equation}
D(x) = \begin{cas}
1, & \text{如果} x \in \mathbb{Q}; \\ % \in 表⽰属于 \text表⽰输出⽂本模式,在数学模式中处理中⽂
0, & \text{如果} x \in \mathbb{R} \tminus \mathbb{Q} % \mathbb输出花体字符,需要amssymb宏包⽀持 \end{cas}
\end{equation}
带鱼的成语