如何右对齐术语

如何右对齐术语
\documentclass[a4paper,titlepage]{article}
\usepackage{amsmath,amssymb}
\newcommand*{\PartialConj}{\ensuremath{\bar{\partial}}}
\newcommand*{\Abs}[1]{\ensuremath{\left\lvert #1\right\rvert}}
\begin{document}
\begin{align*}
\Abs{\PartialConj F(z)}
                & \leqslant \Abs{\chi'\left(\frac{\Abs{z-\alpha_{i}}^{2}}{\delta_{i}^{2}}\right)}\cdot\frac{\Abs{P_{i}(z)}}{\delta_{i}} + \Abs{\chi'\left(\frac{\Abs{z-\alpha_{k}}^{2}}{\delta_{k}^{2}}\right)}\cdot\frac{\Abs{P_{k}(z)}}{\delta_{k}} \\
                &{}+ \Abs{\chi'\left(\frac{\Abs{z-\alpha_{n}}^{2}}{\delta_{n}^{2}}\right)}\cdot\frac{\Abs{P_{n}(z)}}{\delta_{n}} \\
                & \lesssim \sup_{z\in A_{i}}\left\{\frac{\Abs{P_{i}(z)}}{\delta_{i}}\right\} + \sup_{z\in A_{k}}\left\{\frac{\Abs{P_{k}(z)}}{\delta_{k}}\right\} + \sup_{z\in A_{n}}\left\{\frac{\Abs{P_{n}(z)}}{\delta_{n}}\right\}
\end{align*}
\end{document}

我有一个如上所示的长等式,但我想将第二行向右移动,如下图所示。我应该怎么做?

答案1

另一种选择是使用aligned块:

\documentclass[a4paper,titlepage]{article}
\usepackage{amsmath,amssymb}
\newcommand*{\PartialConj}{\ensuremath{\bar{\partial}}}
\newcommand*{\Abs}[1]{\ensuremath{\left\lvert #1\right\rvert}}
\begin{document}
\begin{align*}
\Abs{\PartialConj F(z)}
                & \leqslant \Abs{\chi'\left(\frac{\Abs{z-\alpha_{i}}^{2}}{\delta_{i}^{2}}\right)}\cdot\frac{\Abs{P_{i}(z)}}{\delta_{i}}
                  \begin{aligned}[t]
                    &{}+ \Abs{\chi'\left(\frac{\Abs{z-\alpha_{k}}^{2}}{\delta_{k}^{2}}\right)}\cdot\frac{\Abs{P_{k}(z)}}{\delta_{k}} \\
                    &{}+ \Abs{\chi'\left(\frac{\Abs{z-\alpha_{n}}^{2}}{\delta_{n}^{2}}\right)}\cdot\frac{\Abs{P_{n}(z)}}{\delta_{n}}
                  \end{aligned}\\
                & \lesssim \sup_{z\in A_{i}}\left\{\frac{\Abs{P_{i}(z)}}{\delta_{i}}\right\} + \sup_{z\in A_{k}}\left\{\frac{\Abs{P_{k}(z)}}{\delta_{k}}\right\} + \sup_{z\in A_{n}}\left\{\frac{\Abs{P_{n}(z)}}{\delta_{n}}\right\}
\end{align*}
\end{document}

在此处输入图片描述

答案2

一个快速而简单的解决方案是用于\phantom{}第二行:

\documentclass{article}

\usepackage{mathtools}
\usepackage{amssymb}
\newcommand*{\PartialConj}{\ensuremath{\bar{\partial}}}
\newcommand*{\Abs}[1]{\ensuremath{\left\lvert #1\right\rvert}}
\begin{document}

\begin{align*}
\Abs{\PartialConj F(z)}
              &\leqslant \Abs{\chi'\left(\frac{\Abs{z-\alpha_{i}}^{2}}{\delta_{i}^{2}}\right)}\cdot\frac{\Abs{P_{i}(z)}}{\delta_{i}} + \Abs{\chi'\left(\frac{\Abs{z-\alpha_{k}}^{2}}{\delta_{k}^{2}}\right)}\cdot\frac{\Abs{P_{k}(z)}}{\delta_{k}} \\
              & \,\phantom{\leqslant \Abs{\chi'\left(\frac{\Abs{z-\alpha_{i}}^{2}}{\delta_{i}^{2}}\right)}\cdot\frac{\Abs{P_{i}(z)}}{\delta_{i}}}\, 
                + \Abs{\chi'\left(\frac{\Abs{z-\alpha_{n}}^{2}}{\delta_{n}^{2}}\right)}\cdot\frac{\Abs{P_{n}(z)}}{\delta_{n}}\\
               &\lesssim \sup_{z\in A_{i}}\left\{\frac{\Abs{P_{i}(z)}}{\delta_{i}}\right\} + \sup_{z\in A_{k}}\left\{\frac{\Abs{P_{k}(z)}}{\delta_{k}}\right\} + \sup_{z\in A_{n}}\left\{\frac{\Abs{P_{n}(z)}}{\delta_{n}}\right\}
\end{align*}

\end{document}

在此处输入图片描述

答案3

虽然不太容易,但在我的宏变体的帮助下是可以做到的\Cenhttps://tex.stackexchange.com/a/209732/4427

有一个小问题:下标的宽度不同于n,所以我们需要一个技巧。

我还使用来自的命令改进了这些表达式的外观和输入mathtools;不要滥用\left\right:正如您所见,这里的分隔符的大小更好。

\documentclass[a4paper,titlepage]{article}
\usepackage{amsmath,amssymb,mathtools,calc}

\newcommand*{\PartialConj}{\bar{\partial}}
\DeclarePairedDelimiter{\Abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\Paren}{(}{)}
\DeclarePairedDelimiter{\Brace}{\{}{\}}

\makeatletter
\newcommand{\Shove}[3][c]{%
  \ifmeasuring@
    #3%
  \else
    \makebox[\ifcase\expandafter #2\maxcolumn@widths\fi][#1]{$\displaystyle{#3}$}%
  \fi
}
\makeatother

% a subscript k as wide as n
\newcommand{\kn}{{\mathmakebox[\widthof{$\scriptstyle n$}]{k}}}

\begin{document}

\begin{align*}
\Abs{\PartialConj F(z)}
  & \leqslant \Abs[\bigg]{\chi'\Paren[\bigg]{\frac{\Abs{z-\alpha_{i}}^{2}}{\delta_{i}^{2}}}}
              \cdot
              \frac{\Abs{P_{i}(z)}}{\delta_{i}}
              + \Abs[\bigg]{\chi'\Paren[\bigg]{\frac{\Abs{z-\alpha_{\kn}}^{2}}{\delta_{k}^{2}}}}
              \cdot
              \frac{\Abs{P_{\kn}(z)}}{\delta_{k}} \\
  &\Shove[r]{2}{
     {}+      \Abs[\bigg]{\chi'\Paren[\bigg]{\frac{\Abs{z-\alpha_{n}}^{2}}{\delta_{n}^{2}}}}
              \cdot
              \frac{\Abs{P_{n}(z)}}{\delta_{n}}
   }\\
  & \lesssim  \sup_{z\in A_{i}}\Brace[\bigg]{\frac{\Abs{P_{i}(z)}}{\delta_{i}}}
              + \sup_{z\in A_{k}}\Brace[\bigg]{\frac{\Abs{P_{k}(z)}}{\delta_{k}}}
              + \sup_{z\in A_{n}}\Brace[\bigg]{\frac{\Abs{P_{n}(z)}}{\delta_{n}}}
\end{align*}

\end{document}

在此处输入图片描述

与更标准的方式进行比较

\documentclass[a4paper,titlepage]{article}
\usepackage{amsmath,amssymb,mathtools,calc}

\newcommand*{\PartialConj}{\bar{\partial}}
\DeclarePairedDelimiter{\Abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\Paren}{(}{)}
\DeclarePairedDelimiter{\Brace}{\{}{\}}

\makeatletter
\newcommand{\Shove}[3][c]{%
  \ifmeasuring@
    #3%
  \else
    \makebox[\ifcase\expandafter #2\maxcolumn@widths\fi][#1]{$\displaystyle{#3}$}%
  \fi
}
\makeatother

\newcommand{\kn}{{\mathmakebox[\widthof{$\scriptstyle n$}]{k}}}

\begin{document}

\begin{align*}
\Abs{\PartialConj F(z)}
  & \leqslant \Abs[\bigg]{\chi'\Paren[\bigg]{\frac{\Abs{z-\alpha_{i}}^{2}}{\delta_{i}^{2}}}}
              \cdot
              \frac{\Abs{P_{i}(z)}}{\delta_{i}}
              + \Abs[\bigg]{\chi'\Paren[\bigg]{\frac{\Abs{z-\alpha_{\kn}}^{2}}{\delta_{k}^{2}}}}
              \cdot
              \frac{\Abs{P_{\kn}(z)}}{\delta_{k}} \\
   &  \qquad{}+      \Abs[\bigg]{\chi'\Paren[\bigg]{\frac{\Abs{z-\alpha_{n}}^{2}}{\delta_{n}^{2}}}}
              \cdot
              \frac{\Abs{P_{n}(z)}}{\delta_{n}}\\[1ex]
  & \lesssim  \sup_{z\in A_{i}}\Brace[\bigg]{\frac{\Abs{P_{i}(z)}}{\delta_{i}}}
              + \sup_{z\in A_{k}}\Brace[\bigg]{\frac{\Abs{P_{k}(z)}}{\delta_{k}}}
              + \sup_{z\in A_{n}}\Brace[\bigg]{\frac{\Abs{P_{n}(z)}}{\delta_{n}}}
\end{align*}

\end{document}

在此处输入图片描述

答案4

还有一个解决方案,使用array,但与Denis的做法略有不同:

\documentclass{article}
    \usepackage{amssymb,mathtools}
\newcommand*{\PartialConj}{\ensuremath{\bar{\partial}}}
\newcommand*{\Abs}[1]{\ensuremath{\left\lvert #1\right\rvert}}

    \begin{document}
\begin{align*}
\Abs{\PartialConj F(z)}
    &   \setlength{\arraycolsep}{1pt}
        \begin{array}[t]{ll}
        \leqslant \Abs{\chi'\left(\frac{\Abs{z-\alpha_{i}}^{2}}{\delta_{i}^{2}}\right)}
                            \cdot\frac{\Abs{P_{i}(z)}}{\delta_{i}} 
        &   +     \Abs{\chi'\left(\frac{\Abs{z-\alpha_{k}}^{2}}{\delta_{k}^{2}}\right)}
                            \cdot\frac{\Abs{P_{k}(z)}}{\delta_{k}} \\[1.5ex]
        &   +     \Abs{\chi'\left(\frac{\Abs{z-\alpha_{n}}^{2}}{\delta_{n}^{2}}\right)}
                            \cdot\frac{\Abs{P_{n}(z)}}{\delta_{n}}
        \end{array}\\
    &   \lesssim \sup_{z\in A_{i}}\left\{\frac{\Abs{P_{i}(z)}}{\delta_{i}}\right\} 
            + \sup_{z\in A_{k}}\left\{\frac{\Abs{P_{k}(z)}}{\delta_{k}}\right\} 
            + \sup_{z\in A_{n}}\left\{\frac{\Abs{P_{n}(z)}}{\delta_{n}}\right\}
 \end{align*}
    \end{document}

在此处输入图片描述

编辑:通过\setlength{\arraycolsep}{1pt}之前添加的\begin{array}微调数组各部分之间的间距。

相关内容