我有几个连续的案例环境,每个案例环境包含一对等号。在每个案例环境中,我在等号处垂直对齐。我希望所有等号都在等号处对齐。
\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}
\begin{document}
\begin{equation*}
\setlength{\arraycolsep}{0pt}
\left\{
\begin{array}{@{}rcl}
a^{6} + 2a^{3}b^{3} + b^{6} &{}={}& q^{2} \\
4a^{3}b^{3} &{}={}& -\dfrac{4}{27} \, p^{3}
\end{array}
\right.
,
\end{equation*}
\begin{equation*}
\setlength{\arraycolsep}{0pt}
\left\{
\begin{array}{@{}rcl}
a^{3} + b^{3} &{}={}& -q \\
a^{6} - 2a^{3}b^{3} + b^{6} &{}={}& q^{2} + \dfrac{4}{27} \, p^{3}
\end{array}
\right.
,
\end{equation*}
\begin{equation*}
\setlength{\arraycolsep}{0pt}
\left\{
\begin{array}{@{}rcl}
a^{3} + b^{3} &{}={}& -q \\
(a^{3} - b^{3}){\vphantom{a^{3} + b^{3}}}^{2} &{}={}& q^{2} + \dfrac{4}{27} \, p^{3}
\end{array}
\right.
,
\end{equation*}
\begin{equation*}
\setlength{\arraycolsep}{0pt}
\left\{
\begin{array}{@{}rcl}
a^{3} + b^{3} &{}={}& -q \\
a^{3} - b^{3} &{}={}& \sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}
\end{array}
\right.
.
\end{equation*}
\end{document}
答案1
记得绝不使用连续数学显示环境:环境序列equation
应该是单个gather
(或align
)。
这里有三种方法可以开发卡丹公式,从左到右越来越糟(如“好的,坏的和丑陋的”)。
我认为,没有必要对齐等号;只需对齐括号即可。无论如何,您可以在minipage
示例代码的第三个部分找到获取最差方法的方法。
\documentclass[draft,a4paper,landscape]{amsart}
% enlarge the page just to fit three columns (unnecessary in a real production)
\addtolength{\textwidth}{6cm}
\calclayout
\usepackage{mathtools,array}
\begin{document}
\begin{minipage}{.3\textwidth}
\begin{align*}
&\begin{dcases}
a^{6} + 2a^{3}b^{3} + b^{6} = q^{2} \\
4a^{3}b^{3} = -\dfrac{4}{27} \, p^{3}
\end{dcases}
\\
&\begin{dcases}
a^{3} + b^{3} = -q \\
a^{6} - 2a^{3}b^{3} + b^{6} = q^{2} + \dfrac{4}{27} \, p^{3}
\end{dcases}
\\
&\begin{dcases}
a^{3} + b^{3} = -q \\
(a^{3} - b^{3})^{2} = q^{2} + \dfrac{4}{27} \, p^{3}
\end{dcases}
\\
&\begin{dcases}
a^{3} + b^{3} = -q \\
a^{3} - b^{3} = \sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}
\end{dcases}
\end{align*}
\end{minipage}\hfill
\begin{minipage}{.3\textwidth}
\begin{align*}
&\begin{cases}
\begin{aligned}
a^{6} + 2a^{3}b^{3} + b^{6} &= q^{2} \\
4a^{3}b^{3} &= -\dfrac{4}{27} \, p^{3}
\end{aligned}
\end{cases}
\\
&\begin{cases}
\begin{aligned}
a^{3} + b^{3} &= -q \\
a^{6} - 2a^{3}b^{3} + b^{6} &= q^{2} + \dfrac{4}{27} \, p^{3}
\end{aligned}
\end{cases}
\\
&\begin{cases}
\begin{aligned}
a^{3} + b^{3} &= -q \\
(a^{3} - b^{3})^{2} &= q^{2} + \dfrac{4}{27} \, p^{3}
\end{aligned}
\end{cases}
\\
&\begin{cases}
\begin{aligned}
a^{3} + b^{3} &= -q \\
a^{3} - b^{3} &= \sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}
\end{aligned}
\end{cases}
\end{align*}
\end{minipage}\hfill
\begin{minipage}{.3\textwidth}
\newlength{\widestleft}
\settowidth{\widestleft}{$a^{6} + 2a^{3}b^{3} + b^{6}$}
\newenvironment{myaligned}
{\,\begin{array}{@{}>{\raggedleft$}p{\widestleft}<{$}@{}>{{}}l@{}}}
{\end{array}}
\begin{align*}
&\begin{cases}
\begin{myaligned}
a^{6} + 2a^{3}b^{3} + b^{6} &= q^{2} \\
4a^{3}b^{3} &= -\dfrac{4}{27} \, p^{3}
\end{myaligned}
\end{cases}
\\
&\begin{cases}
\begin{myaligned}
a^{3} + b^{3} &= -q \\
a^{6} - 2a^{3}b^{3} + b^{6} &= q^{2} + \dfrac{4}{27} \, p^{3}
\end{myaligned}
\end{cases}
\\
&\begin{cases}
\begin{myaligned}
a^{3} + b^{3} &= -q \\
(a^{3} - b^{3})^{2} &= q^{2} + \dfrac{4}{27} \, p^{3}
\end{myaligned}
\end{cases}
\\
&\begin{cases}
\begin{myaligned}
a^{3} + b^{3} &= -q \\
a^{3} - b^{3} &= \sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}
\end{myaligned}
\end{cases}
\end{align*}
\end{minipage}
\end{document}
如果你想让它看起来比丑还要丑,这里有一个方法
\documentclass[draft,a4paper,landscape]{amsart}
\usepackage{mathtools,array}
\newlength{\widestright}
\newenvironment{horriblesystem}[1]
{\settowidth{\widestright}{${}=#1$}%
\left\{\,
\begin{array}{@{}r@{}>{\raggedright\arraybackslash${}}p{\widestright}<{$}@{}}}
{\end{array}\right.}
\begin{document}
\begin{align*}
\begin{horriblesystem}{\sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}}
a^{6} + 2a^{3}b^{3} + b^{6} &= q^{2} \\
4a^{3}b^{3} &= -\dfrac{4}{27} \, p^{3}
\end{horriblesystem}
\\
\begin{horriblesystem}{\sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}}
a^{3} + b^{3} &= -q \\
a^{6} - 2a^{3}b^{3} + b^{6} &= q^{2} + \dfrac{4}{27} \, p^{3}
\end{horriblesystem}
\\
\begin{horriblesystem}{\sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}}
a^{3} + b^{3} &= -q \\
(a^{3} - b^{3})^{2} &= q^{2} + \dfrac{4}{27} \, p^{3}
\end{horriblesystem}
\\
\begin{horriblesystem}{\sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}}
a^{3} + b^{3} &= -q \\
a^{3} - b^{3} &= \sqrt{q^{2} + \dfrac{4}{27} \, p^{3}}
\end{horriblesystem}
\end{align*}
\end{document}
请不要使用这个!你的读者会感激你的。;-)