对齐环境中的标签

对齐环境中的标签

我有以下 MWE

\documentclass[12pt, A4paper]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{bm}
\usepackage{epstopdf}
\usepackage[nodayofweek]{datetime}
\usepackage{setspace}
\usepackage[left=2cm, right=2cm, top=2cm,bottom=2cm]{geometry}

\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu}

\begin{document}
\section{Introduction}

Consider the following

\begin{align}
\frac{\frac{\partial\pi\left( z \right)}{\partial CAF_{ij}}}{GLOB_{j}}=&\left( \alpha_{2} + \alpha_{4} \right)\{\pi\left\lbrack \alpha_{0} + \alpha_{1}\overbar{AF}_{j} + \left( \alpha_{2} + \alpha_{4} \right)CAF_{ij} + \alpha_{3} + \beta^{'}\mathbf{X} \right\rbrack \times \\ \notag
&\left\lbrack 1 - \pi\left\lbrack \alpha_{0} + \alpha_{1}\overset{}{\text{AF}_{j}} + \left( \alpha_{2} + \alpha_{4} \right)\text{CAF}_{\text{ij}} + \alpha_{3} + \beta^{'}\mathbf{X} \right\rbrack \right\rbrack\}- \\ \notag
&\alpha_{2}\{\pi\left( \alpha_{0} + \alpha_{1}\overset{}{AF_{j}} + \alpha_{2}CAF_{ij} + \beta^{'}\mathbf{X} \right) \times \\ \notag
&1 - \pi\left( \alpha_{0} + \alpha_{1}\overset{}{AF_{j}} + \alpha_{2}CAF_{ij} + \beta^{'}\mathbf{X} \right)\} 
\end{align}

\end{document}

如您所见,方程式的数字放在第一行的旁边,而我希望它放在最后一行的旁边。我尝试将其用于notag前三行,但没有成功。我犯了什么错误?提前致谢。

答案1

以下是一种实现此目的的方法,并进行了一些改进,并且代码更轻量:

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage[thinp]{esdiff} 
\usepackage[margin=2cm, showframe]{geometry}

\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu}


    \DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
    \DeclareFontShape{U}{mathx}{m}{n}{
    <-6> mathx5 <6-7> mathx6 <7-8> mathx7
    <8-9> mathx8 <9-10> mathx9
    <10-12> mathx10 <12-> mathx12
    }{}
    \DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
    \DeclareFontSubstitution{U}{mathx}{m}{n}

    \DeclareMathAccent{\varwidehat}{0}{mathx}{"70}
    \DeclareMathAccent{\widebar}{0}{mathx}{"73}

\begin{document}
\section{Introduction}

Consider the following
\begin{align}
  \notag
  \frac{\diffp{\pi(z)}{{CAF_{ij}}}}{GLOB_j} & = (\alpha_{2} + \alpha_{4})
  \begin{aligned}[t]\Bigl\{\pi \bigl(\alpha_{0} &+ \alpha_{1}\widebar{AF_{j}} + (\alpha_{2} + \alpha_{4})CAF_{ij} + \alpha_{3} + \beta' \mathbf{X} \bigr) \times \\
  \Bigl\lbrack1& - \pi \bigl( \alpha_{0} + \alpha_{1}\overset{}{\text{AF}_{j}} + (\alpha_{2} + \alpha_{4})\text{CAF}_{\text{ij}} + \alpha_{3} + \beta^{'}\mathbf{X} \bigr) \Bigr\rbrack\Bigr\}
  \end{aligned}\\
    & \phantom{{}={}}\begin{aligned}[b]{}-\alpha_{2}\Bigl\{ \pi \bigl( \alpha_{0}+ \alpha_{1}\overset{}{AF_{j}} & + \alpha_{2}CAF_{ij} + \beta' \mathbf{X} \bigr) \times \\
  \Bigl\lbrack 1 &- \pi \bigl( \alpha_{0} + \alpha_{1}\overset{}{AF_{j}} + \alpha_{2}CAF_{ij} + \beta' \mathbf{X} \bigr) \Bigr\rbrack\Bigr\}
  \end{aligned}
\end{align}

\end{document}

在此处输入图片描述

相关内容