我确信这是一个之前已经回答过的古老问题,但我找不到答案......我有一组方程式(以示意图形式)显示,使用 amsmath:
\begin{align*}
a &= x1 &y &=1,\\
&= x2 & &=2,\\
&= x3 & &=3.
\end{align*}
我想要做的是将方程式的第二个“列”(“y=”结果)放在一组横跨所有三行的括号内。只是看不懂怎么做……?
答案1
一个简短的解决方案,其[left=.., right=..]
关键在于empheq
:
\documentclass{article}
\usepackage{empheq} %% loads mathtools, hence amsmath
\begin{document}
\begin{empheq}[left ={\begin{aligned}
a &= x1 \\ &= x2 \\ &= x3
\end{aligned}\qquad\empheqlbrace}, right =\empheqrbrace]{gather*}
\begin{aligned}
y &=1,\\
&=2,\\
&=3.
\end{aligned}
\end{empheq}
\end{document}
答案2
像这样吗?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\left.
\begin{aligned}
a &= x_1 \\
&= x_2 \\
&= x_3
\end{aligned}
\right\}
\quad
\left\{
\begin{aligned}
y &= 1 \\
&= 2 \\
&= 3
\end{aligned}
\right\}
\end{equation*}
\end{document}
编辑
以下是其他一些方法。第二种方法需要\usepackage{blkarray}
在序言中
\begin{equation*}
\left.
\begin{array}{r}
a = x_1 \\
= x_2 \\
= x_3
\end{array}
\right\}
\quad
\left\{
\begin{array}{r}
y = 1 \\
= 2 \\
= 3
\end{array}
\right\}
\end{equation*}
\bigskip
\begin{center}
\begin{blockarray}{r\}c\{r\}}
$a = x_1$ & \quad & $y = 1$ \\
$ = x_2$ & \quad & $ = 2$ \\
$ = x_3$ & \quad & $ = 3$
\end{blockarray}
答案3
尝试这个:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\left.
\begin{aligned}
a &= x1 &&&y &=1,\\
&= x2 &&& &=2,\\
&= x3 &&& &=3.
\end{aligned}
\right\}
\end{equation*}
\end{document}
也许是这个:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\begin{aligned}
a &= x1\\
&= x2\\
&= x3
\end{aligned}
\quad\left\{
\begin{aligned}
y &=1,\\
&=2,\\
&=3.
\end{aligned}
\right\}
\end{equation*}
\end{document}