LaTex数学公式—多行公式

备注:由于写作环境,内容还未完善!!!
目录:

1. 罗列多行公式

基础语法:

  • 1.gather 环境 :可以在\\ 前使用\notag 命令阻止指定行不编号;
\begin{gather}
a + b = b + a \\
ac = ba \notag
\end{gather}

\begin{gather}
a + b = b + a \
ac = ba \notag
\end{gather}

  • 2.gather* 环境:公式不编号
\begin{gather*}
a + b = b + a \\
ac = ba
\end{gather*}

\begin{gather*}
a + b = b + a \
ac = ba
\end{gather*}

  • 3.alignalign* 环境:
  • (1)允许公式按等号或其他关系符对齐,在关系符前加 &表示对齐;
  • (2)允许排列多列对齐公式,列与列之间使用& 分隔;
\begin{align*}
a &+ b = b + a \\
a &+ c = ba
\end{align*}

\begin{align*}
a &+ b = b + a \
a&+c = ba
\end{align*}

\begin{align*}
a + b = b + a & a + c = ba & x = \cos t \\
x = y & y = \sin x & y = x + 1
\end{align*}

\begin{align*}
a + b &= b + a & a + c &= ba & x &= \cos t \
x &= y & y &= \sin x & y &= x + 1
\end{align*}

  • (3)特殊对齐需求
\begin{align*}
(a+b)(a^2-ab+b^2)  \\
= a^3 - a^2b + ab^2 + a^2b + ab^2 + b^2   \\
= a^3 + b^3
\end{align*}

\begin{align*}
(a+b)(a2-ab+b2) \
= a^3 - a^2b + ab^2 + a^2b + ab^2 + b^2 \
= a^3 + b^3
\end{align*}
**注意:**当等式左侧没有公式时,等号与右侧公式间距为0,此时可以使用{};而且对齐是以符号&为准的;

\begin{align*}
&(a+b)(a^2-ab+b^2)  \\
={} & a^3 - a^2b + ab^2 + a^2b + ab^2 + b^2   \\
&={}  a^3 + b^3
\end{align*}

\begin{align*}
&(a+b)(a2-ab+b2) \
={} & a^3 - a^2b + ab^2 + a^2b + ab^2 + b^2 \
&={} a^3 + b^3
\end{align*}

  • (4)flalign环境与flalign*环境:与align环境类似,把公式每两列分为一组,分别向右向左对齐,而且公式的间距是可以无限伸长的弹性距离,几列公式会在水平方向分散对齐;

  • (5)alignat环境与\quad距离调整命令。

2. 拆分单个公式

3. 将公式组合成块

\begin{equation}
D(x) = 
\begin{cases}
1, & \text{if } x \in \mathbb{Q	}; \\
0, & \text{if } x \in \mathbb{R}\setminus \mathbb{Q}. 
\end{cases}
\end{equation}

\begin{equation}
D(x) = \begin{cases}
1, & \text{if } x \in \mathbb{Q }; \
0, & \text{if } x \in \mathbb{R}\setminus \mathbb{Q}.
\end{cases}
\end{equation}

\begin{gather}
a + b = b + a \
ac = ba \notag
\end{gather}

  • 2
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值