我有下面的代码
\begin{gather} V(x,y) = 0 \Rightarrow \begin{aligned}
{V_x}(x,y) &= \frac{{{y^2}(12 - 2xy - {x^2})}}{{2{{(x + y)}^2}}} = 0,\\
{V_y}(x,y) &= \frac{{{x^2}(12 - 2xy - {y^2})}}{{2{{(x + y)}^2}}} = 0.
\end{aligned}\\
\Rightarrow 12-2xy-x^2 = 0\quad \text{and}\quad 12-2xy-y^2 = 0.
\end{gather}
我怎样才能交叉引用这个方程式\frac{{{y^2}(12 - 2xy - {x^2})}}{{2{{(x + y)}^2}}} = 0
?
答案1
以下解决方案大量借鉴(窃取??)这个答案@egreg 对这个问题的回答嵌套方程编号。
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
&\makebox[0pt][l]{\smash{\raisebox{-1\baselineskip}{%
$\mathllap{V(x,y) = 0\ }\Rightarrow\quad$ }}}
\hphantom{\Rightarrow\quad}
V_x(x,y) = \frac{y^2(12 - 2xy - x^2)}{2(x + y)^2} = 0, \\
& \hphantom{\Rightarrow\quad}
V_y(x,y) = \frac{x^2(12 - 2xy - y^2)}{2(x + y)^2} = 0.\\[2\jot]
&\Rightarrow 12-2xy-x^2 = 0 \quad \text{and}\quad 12-2xy-y^2 = 0.
\end{align}
\end{document}
附录:原帖者发了后续请求,要求三元组\Rightarrow
第三行开头不加 a,=
第三行第一个符号与=
前两行第一个符号对齐。开始吧。
\documentclass{article}
\usepackage{mathtools,showframe}
\begin{document}
\begin{align}
\makebox[0pt][l]{\smash{\raisebox{-1\baselineskip}{%
$\mathllap{V(x,y) = 0\ }\Rightarrow\quad$}}}
\hphantom{\Rightarrow\quad}
V_x(x,y) &= \frac{y^2(12 - 2xy - x^2)}{2(x + y)^2} = 0, \\
\hphantom{\Rightarrow\quad}
V_y(x,y) &= \frac{x^2(12 - 2xy - y^2)}{2(x + y)^2} = 0.\\[2\jot]
12-2xy-x^2 &= 0 \quad \text{and}\quad 12-2xy-y^2 = 0.
\end{align}
\end{document}
答案2
如果我必须这样做,我可能会使用align
并调整间距...
\documentclass{article}
\usepackage{amsmath}
\begin{document}
gather
\begin{gather}
V(x,y) = 0 \Rightarrow \begin{aligned}
{V_x}(x,y) &= \frac{{{y^2}(12 - 2xy - {x^2})}}{{2{{(x + y)}^2}}} = 0,\\
{V_y}(x,y) &= \frac{{{x^2}(12 - 2xy - {y^2})}}{{2{{(x + y)}^2}}} = 0.
\end{aligned}\\
\Rightarrow 12-2xy-x^2 = 0\quad \text{and}\quad 12-2xy-y^2 = 0.
\end{gather}
align
\begin{align}
&&{V_x}(x,y) &= \frac{{{y^2}(12 - 2xy - {x^2})}}{{2{{(x + y)}^2}}} = 0,\\[-5pt]
V(x,y) = 0 \Rightarrow\notag\\[-5pt]
&&{V_y}(x,y) &= \frac{{{x^2}(12 - 2xy - {y^2})}}{{2{{(x + y)}^2}}} = 0.\\[5pt]
\Rightarrow&& 12-2xy-x^2 &= 0\quad \text{and}\quad 12-2xy-y^2 = 0.
\end{align}
\end{document}