\begin{align}
\begin{split}
\pd{EU}{\alpha} &= d(\theta) U'(\pi_{1}) [G_{\alpha}(\alpha, \theta, \epsilon) - \widebar{P} C_{\alpha}(\alpha, \theta)] \\
&+ (1-d(\theta)) U'(\pi_{0}) [G_{\alpha}(\alpha, \theta, 0) - C_{\alpha}(\alpha, \theta)] = 0,\\
\pd{EU}{\theta} &= h'(\theta)[U(\pi_{0}) - U(\pi_{1})] \\
&+ d(\theta) U'(\pi_{1})[G_{\theta}(\alpha, \theta, \epsilon) - \widebar{P} C_{\theta}(\alpha, \theta)] \\
&+(1-d(\theta))U'(\pi_{0})[G_{\theta}(\alpha, \theta, 0) - 1] = 0.\\
\end{split}
\end{align}
我想标记方程 4 和方程 5,然后引用它们。这里我仅将两个方程标记为一个。
编辑:
根据以下答案,我能够标记方程式:
\begin{align}
\begin{split}
\pd{EU}{\alpha} &= d(\theta) U'(\pi_{1}) [G_{\alpha}(\alpha, \theta, \epsilon) - \widebar{P} C_{\alpha}(\alpha, \theta)] \\
&+ (1-d(\theta)) U'(\pi_{0}) [G_{\alpha}(\alpha, \theta, 0) - C_{\alpha}(\alpha, \theta)]=0
\end{split}\label{eqn:4}\\
\begin{split}
\pd{EU}{\theta} &= h'(\theta)[U(\pi_{0}) - U(\pi_{1})] \\
&+ d(\theta) U'(\pi_{1})[G_{\theta}(\alpha, \theta, \epsilon) - \widebar{P} C_{\theta}(\alpha, \theta)] \\
&+(1-d(\theta))U'(\pi_{0})[G_{\theta}(\alpha, \theta, 0) - 1] = 0.\\
\end{split}\label{eqn:5}\
\end{align}
但是,现在这两个方程式彼此不一致,我希望它们对齐。有什么建议吗?
答案1
使用\nonumber
(或\notag
) 避免对 内的特定方程式进行编号align
,否则它将被编号(您可以\label
-\ref
它):
\documentclass{article}
\usepackage{amsmath,mathabx}
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
\begin{document}
\begin{align}
\pd{EU}{\alpha} &= d(\theta) U'(\pi_{1}) \bigl[G_{\alpha}(\alpha, \theta, \epsilon) - \widebar{P} C_{\alpha}(\alpha, \theta)\bigr] \nonumber \\
&\hphantom{=} + (1-d(\theta)) U'(\pi_{0}) [G_{\alpha}(\alpha, \theta, 0) - C_{\alpha}(\alpha, \theta)] = 0, \label{eq:first} \\
\pd{EU}{\theta} &= h'(\theta)\bigl[ U(\pi_{0}) - U(\pi_{1})\bigr] \nonumber \\
&\hphantom{=} + d(\theta) U'(\pi_{1})\bigl[G_{\theta}(\alpha, \theta, \epsilon) - \widebar{P} C_{\theta}(\alpha, \theta)\bigr] \nonumber \\
&\hphantom{=} + (1-d(\theta))U'(\pi_{0})\bigl[G_{\theta}(\alpha, \theta, 0) - 1\bigr] = 0. \label{eq:second}
\end{align}
Consider reviewing~\eqref{eq:first} and~\eqref{eq:second}.
\end{document}
答案2
这里有一种方法可以给你你想要的结果。
\documentclass{article}
\usepackage{amsmath}
\newcommand{\pd}[2]{\frac{\partial {#1}}{\partial {#2}}}
\begin{document}
\setcounter{equation}{3}
\begin{align}
\begin{split}\smash[b]{\pd{EU}{\alpha}}
&= d(\theta) U'(\pi_{1})
[G_{\alpha}(\alpha, \theta, \epsilon) - \bar{P} C_{\alpha}(\alpha, \theta)] \\
& \quad+ (1-d(\theta)) U'(\pi_{0})
[G_{\alpha}(\alpha, \theta, 0) - C_{\alpha}(\alpha, \theta)] = 0,
\end{split}\label{aa}\\
\begin{split}\smash[b]{\pd{EU}{\theta}}
&= h'(\theta)[U(\pi_{0}) - U(\pi_{1})] \\
& \quad+ d(\theta) U'(\pi_{1})
[G_{\theta}(\alpha, \theta, \epsilon) - \bar{P} C_{\theta}(\alpha, \theta)] \\
& \quad+(1-d(\theta))U'(\pi_{0})
[G_{\theta}(\alpha, \theta, 0) - 1] = 0.
\end{split}\label{bb}
\end{align}
some text \eqref{aa} some more text \eqref{bb}
\end{document}
有几件事需要注意:
分数会分散每个“分割”组的第一行和第二行之间的空间,因此我应用了
\smash
底部[b]
;两个组之间更宽的空间是合适的,但由于右侧没有任何高度和深度超过单行的东西,所以结果(在我看来)这样看起来更好。分数是每组中位于符号左边的唯一部分
=
。所有后续行均缩进,\quad
以使结构更清晰。
答案3
这是你想要的吗:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\pd}[2]{\frac{\partial {#1}}{\partial {#2}}}
\begin{document}
\begin{align}
\begin{split} \pd{EU}{\alpha} &= d(\theta) U'(\pi_{1}) [G_{\alpha}(\alpha, \theta, \epsilon) - \bar{P} C_{\alpha}(\alpha, \theta)] \\
&\quad+ (1-d(\theta)) U'(\pi_{0}) [G_{\alpha}(\alpha, \theta, 0) - C_{\alpha}(\alpha, \theta)] = 0,\end{split}\label{aa}\\
\begin{split}\pd{EU}{\theta} &= h'(\theta)[U(\pi_{0}) - U(\pi_{1})] \\
&\quad+ d(\theta) U'(\pi_{1})[G_{\theta}(\alpha, \theta, \epsilon) - \bar{P} C_{\theta}(\alpha, \theta)] \\ &\quad+(1-d(\theta))U'(\pi_{0})[G_{\theta}(\alpha, \theta, 0) - 1] = 0. \end{split}\label{bb}
\end{align}
some text \eqref{aa} some more text \eqref{bb}
\end{document}