使用对齐和拆分对齐方程

使用对齐和拆分对齐方程

我有一组大量的方程式,但我无法正确地格式化这些方程式。

  • 每个方程的第一行应该左对齐(也许这是自动完成的?)。
  • 每个等式的其他行应与第一行右对齐。

参见图片(2 个方程式的示例)。我希望我说得有道理。

在此处输入图片描述

代码:

\documentclass{article}

\usepackage{nomencl}
\makenomenclature

\usepackage{siunitx}
\usepackage{amsmath}
\usepackage{upgreek}

\begin{document}

\begin{align}
    \begin{split}
        \epsilon^2\partial_{\textnormal{t}}\Tilde{\pi}+\epsilon^2\mathbf{v}_{\textnormal{h}}\cdot\nabla_{\textnormal{h}}\Tilde{\pi}+\epsilon^2w\partial_{\textnormal{z}}\Tilde{\pi}+\gamma\Bar{\pi}\left(\nabla_{\textnormal{h}}\cdot\mathbf{v}_{\textnormal{h}}+\frac{1}{\Bar{p}}\partial_{\textnormal{z}}\left(\Bar{p}w\right)\right) \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\left(\nabla_{\textnormal{h}}\cdot\mathbf{v}_{\textnormal{h}}+\partial_{\textnormal{z}}w\right)=\frac{\gamma{\color{red}\pi}}{\Theta}Q_{\Theta}\,,
    \end{split}
    \\[4ex]
    \begin{split}
        \epsilon^2\left(\epsilon\partial_{\textnormal{t}_\textnormal{m}}+\epsilon^2\partial_{\textnormal{t}_\textnormal{s}}\right)\Tilde{\pi}+\epsilon^2\mathbf{v}_{\textnormal{h}}\cdot\left(\epsilon\nabla_{\textnormal{m}}+\epsilon^2\nabla_{\textnormal{s}}\right)\Tilde{\pi}+\epsilon^2\left(\epsilon\alpha_{\textnormal{w}}w_{1}+\epsilon^2\,w_{2}+\dots\right)\partial_{\textnormal{z}}\Tilde{\pi} \\
        +\gamma\Bar{\pi}\left(\left(\epsilon\nabla_{\textnormal{m}}\cdot\epsilon^2\nabla_{\textnormal{s}}\right)\cdot\mathbf{v}_{\textnormal{h}}+\frac{1}{\Bar{p}}\partial_{\textnormal{z}}\left(\Bar{p}\left(\epsilon\alpha_{\textnormal{w}}w_{1}+\epsilon^2\,w_{2}+\dots\right)\right)\right) \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\left(\left(\epsilon\nabla_{\textnormal{m}}+\epsilon^2\nabla_{\textnormal{s}}\right)\cdot\mathbf{v}_{\textnormal{h}}+\partial_{\textnormal{z}}\left(\right)\epsilon\alpha_{\textnormal{w}}w_{1}+\epsilon^2\,w_{2}+\dots\right)=\frac{\gamma{\color{red}\left(\Bar{\pi}+\epsilon^2\Gamma\Tilde{\pi}\right)}}{1+\epsilon\Bar{\Theta}+\epsilon^2\Tilde{\Theta}}\left(\epsilon^2\alpha_{\textnormal{w}}Q_{\Theta,2}+\epsilon^3Q_{\Theta,3}+\dots\right)\,, 
    \end{split}
    \\[4ex]
    \begin{split}
        \epsilon^3\partial_{\textnormal{t}_\textnormal{m}}\Tilde{\pi}+\epsilon^4\partial_{\textnormal{t}_\textnormal{s}}\Tilde{\pi}+\epsilon^3\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)\cdot\nabla_{\textnormal{m}}\Tilde{\pi}+\epsilon^4\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)\cdot\nabla_{\textnormal{s}}\Tilde{\pi}+\epsilon^3\left(\alpha_{\textnormal{w}}w_{1}+\epsilon\,w_{2}+\dots\right)\partial_{\textnormal{z}}\Tilde{\pi} \\
        +\gamma\Bar{\pi}\left(\epsilon\nabla_{\textnormal{m}}\cdot\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)+\epsilon^2\nabla_{\textnormal{s}}\cdot\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)+\frac{\epsilon}{\Bar{p}}\partial_{\textnormal{z}}\left[\Bar{p}\left(\alpha_{\textnormal{w}}w_{1}+\epsilon\,w_{2}+\dots\right)\right]\right) \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\left[\epsilon\nabla_{\textnormal{m}}\cdot\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)+\epsilon^2\nabla_{\textnormal{s}}\cdot\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)+\epsilon\partial_{\textnormal{z}}\left(\alpha_{\textnormal{w}}w_{1}+\epsilon\,w_{2}+\dots\right)\right] \\
        =\frac{\gamma{\color{red}\left(\Bar{\pi}+\epsilon^2\Tilde{\pi}\right)}}{1+\epsilon\Bar{\Theta}+\epsilon^2\Tilde{\Theta}}\left(\epsilon^2\alpha_{\textnormal{w}}Q_{\Theta,2}+\epsilon^3Q_{\Theta,3}+\dots\right)\,.
    \end{split}
\end{align}
\end{document}

编辑:

你不必更改括号或竖线和波浪线,我知道它们并不理想

答案1

这里没有对齐点(所以没有&),所以不应使用align或。适用于需要换行的单行长行。这里有几个,我把它们放在 中,并使用了嵌套版本(来自)。splitmultlinegathermultlinedmathtools

它仍然有点丑陋,但您可以更轻松地调整换行符以反映其含义。

在此处输入图片描述

\documentclass{article}

\usepackage{nomencl}
\makenomenclature

\usepackage{siunitx}
\usepackage{mathtools}
\usepackage{upgreek}

\begin{document}

\begin{gather}
  \begin{multlined}
        \epsilon^2\partial_{\mathrm{t}}\Tilde{\pi}+\epsilon^2\mathbf{v}_{\mathrm{h}}\cdot\nabla_{\mathrm{h}}\Tilde{\pi}+\epsilon^2w\partial_{\mathrm{z}}\Tilde{\pi}+\gamma\Bar{\pi}\bigl(\nabla_{\mathrm{h}}\cdot\mathbf{v}_{\mathrm{h}}+\frac{1}{\Bar{p}}\partial_{\mathrm{z}}\bigl(\Bar{p}w\bigr)\bigr) \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\bigl(\nabla_{\mathrm{h}}\cdot\mathbf{v}_{\mathrm{h}}+\partial_{\mathrm{z}}w\bigr)
        \\=\frac{\gamma{\color{red}\pi}}{\Theta}Q_{\Theta}\,,
        \end{multlined}
        \\[10pt]
        \begin{multlined}
        \epsilon^2\bigl(\epsilon\partial_{\mathrm{t}_\mathrm{m}}+\epsilon^2\partial_{\mathrm{t}_\mathrm{s}}\bigr)\Tilde{\pi}+\epsilon^2\mathbf{v}_{\mathrm{h}}\cdot\bigl(\epsilon\nabla_{\mathrm{m}}+\epsilon^2\nabla_{\mathrm{s}}\bigr)\Tilde{\pi}+\epsilon^2\bigl(\epsilon\alpha_{\mathrm{w}}w_{1}+\epsilon^2\,w_{2}+\dots\bigr)\partial_{\mathrm{z}}\Tilde{\pi} \\
        +\gamma\Bar{\pi}\bigl(\bigl(\epsilon\nabla_{\mathrm{m}}\cdot\epsilon^2\nabla_{\mathrm{s}}\bigr)\cdot\mathbf{v}_{\mathrm{h}}+\frac{1}{\Bar{p}}\partial_{\mathrm{z}}\bigl(\Bar{p}\bigl(\epsilon\alpha_{\mathrm{w}}w_{1}+\epsilon^2\,w_{2}+\dots\bigr)\bigr)\bigr) \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\bigl(\bigl(\epsilon\nabla_{\mathrm{m}}+\epsilon^2\nabla_{\mathrm{s}}\bigr)\cdot\mathbf{v}_{\mathrm{h}}+\partial_{\mathrm{z}}\bigl(\bigr)\epsilon\alpha_{\mathrm{w}}w_{1}+\epsilon^2\,w_{2}+\dots\bigr)\\
        =\frac{\gamma{\color{red}\bigl(\Bar{\pi}+\epsilon^2\Gamma\Tilde{\pi}\bigr)}}{1+\epsilon\Bar{\Theta}+\epsilon^2\Tilde{\Theta}}\bigl(\epsilon^2\alpha_{\mathrm{w}}Q_{\Theta,2}+\epsilon^3Q_{\Theta,3}+\dots\bigr)\,, 
    \end{multlined}\raisetag{45pt}
    \\[10pt]
    \begin{multlined}
      \epsilon^3\partial_{\mathrm{t}_\mathrm{m}}\Tilde{\pi}+\epsilon^4\partial_{\mathrm{t}_\mathrm{s}}\Tilde{\pi}+\epsilon^3\bigl(\mathbf{v}_{\mathrm{h,0}}+\epsilon\mathbf{v}_{\mathrm{h,1}}+\dots\bigr)\cdot\nabla_{\mathrm{m}}\Tilde{\pi}+\epsilon^4\bigl(\mathbf{v}_{\mathrm{h,0}}+\epsilon\mathbf{v}_{\mathrm{h,1}}+\dots\bigr)\cdot\\
      \nabla_{\mathrm{s}}\Tilde{\pi}+\epsilon^3\bigl(\alpha_{\mathrm{w}}w_{1}+\epsilon\,w_{2}+\dots\bigr)\partial_{\mathrm{z}}\Tilde{\pi} \\
      +\gamma\Bar{\pi}\bigl(\epsilon\nabla_{\mathrm{m}}\cdot\bigl(\mathbf{v}_{\mathrm{h,0}}+\epsilon\mathbf{v}_{\mathrm{h,1}}+\dots\bigr)+\epsilon^2\nabla_{\mathrm{s}}\cdot\bigl(\mathbf{v}_{\mathrm{h,0}}+\epsilon\mathbf{v}_{\mathrm{h,1}}+\dots\bigr)+\\
      \frac{\epsilon}{\Bar{p}}\partial_{\mathrm{z}}\bigl[\Bar{p}\bigl(\alpha_{\mathrm{w}}w_{1}+\epsilon\,w_{2}+\dots\bigr)\bigr]\bigr) \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\bigl[\epsilon\nabla_{\mathrm{m}}\cdot\bigr(\mathbf{v}_{\mathrm{h,0}}+\epsilon\mathbf{v}_{\mathrm{h,1}}+\dots\bigr)+\epsilon^2\nabla_{\mathrm{s}}\cdot\\
          \Bigl(\mathbf{v}_{\mathrm{h,0}}+\epsilon\mathbf{v}_{\mathrm{h,1}}+\dots\bigr)+\epsilon\partial_{\mathrm{z}}\bigl(\alpha_{\mathrm{w}}w_{1}+\epsilon\,w_{2}+\dots\bigr)\bigr] \\
        =\frac{\gamma{\color{red}\bigl(\Bar{\pi}+\epsilon^2\Tilde{\pi}\bigr)}}{1+\epsilon\Bar{\Theta}+\epsilon^2\Tilde{\Theta}}\bigl(\epsilon^2\alpha_{\mathrm{w}}Q_{\Theta,2}+\epsilon^3Q_{\Theta,3}+\dots\bigr)\,.\raisetag{60pt}
  \end{multlined}
\end{gather}
\end{document}
    

答案2

这对我有用!

\documentclass{article}

\usepackage{nomencl}
\makenomenclature

\usepackage{siunitx}
\usepackage{mathtools}
\usepackage{upgreek}

\begin{document}

\noindent X\dotfill X
\begin{align*}
    &\begin{aligned}
        \epsilon^2\partial_{\textnormal{t}}\Tilde{\pi}+\epsilon^2\mathbf{v}_{\textnormal{h}}\cdot\nabla_{\textnormal{h}}\Tilde{\pi}+\epsilon^2w\partial_{\textnormal{z}}\Tilde{\pi}+\gamma\Bar{\pi}\left(\nabla_{\textnormal{h}}\cdot\mathbf{v}_{\textnormal{h}}+\frac{1}{\Bar{p}}\partial_{\textnormal{z}}\left(\Bar{p}w\right)\right)& \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\left(\nabla_{\textnormal{h}}\cdot\mathbf{v}_{\textnormal{h}}+\partial_{\textnormal{z}}w\right)=\frac{\gamma{\color{red}\pi}}{\Theta}Q_{\Theta}\,,&
    \end{aligned}
    \\[4ex]
    &\begin{aligned}
        \epsilon^2\left(\epsilon\partial_{\textnormal{t}_\textnormal{m}}+\epsilon^2\partial_{\textnormal{t}_\textnormal{s}}\right)\Tilde{\pi}+\epsilon^2\mathbf{v}_{\textnormal{h}}\cdot\left(\epsilon\nabla_{\textnormal{m}}+\epsilon^2\nabla_{\textnormal{s}}\right)\Tilde{\pi}+\epsilon^2\left(\epsilon\alpha_{\textnormal{w}}w_{1}+\epsilon^2\,w_{2}+\dots\right)\partial_{\textnormal{z}}\Tilde{\pi}& \\
        +\gamma\Bar{\pi}\left(\left(\epsilon\nabla_{\textnormal{m}}\cdot\epsilon^2\nabla_{\textnormal{s}}\right)\cdot\mathbf{v}_{\textnormal{h}}+\frac{1}{\Bar{p}}\partial_{\textnormal{z}}\left(\Bar{p}\left(\epsilon\alpha_{\textnormal{w}}w_{1}+\epsilon^2\,w_{2}+\dots\right)\right)\right)& \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\left(\left(\epsilon\nabla_{\textnormal{m}}+\epsilon^2\nabla_{\textnormal{s}}\right)\cdot\mathbf{v}_{\textnormal{h}}+\partial_{\textnormal{z}}\left(\right)\epsilon\alpha_{\textnormal{w}}w_{1}+\epsilon^2\,w_{2}+\dots\right)& \\
        =\frac{\gamma{\color{red}\left(\Bar{\pi}+\epsilon^2\Gamma\Tilde{\pi}\right)}}{1+\epsilon\Bar{\Theta}+\epsilon^2\Tilde{\Theta}}\left(\epsilon^2\alpha_{\textnormal{w}}Q_{\Theta,2}+\epsilon^3Q_{\Theta,3}+\dots\right)\,,& 
    \end{aligned}
    \\[4ex]
    &\begin{aligned}
        \epsilon^3\partial_{\textnormal{t}_\textnormal{m}}\Tilde{\pi}+\epsilon^4\partial_{\textnormal{t}_\textnormal{s}}\Tilde{\pi}+\epsilon^3\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)\cdot\nabla_{\textnormal{m}}\Tilde{\pi}+\epsilon^4\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)\cdot\nabla_{\textnormal{s}}\Tilde{\pi}+\epsilon^3\left(\alpha_{\textnormal{w}}w_{1}+\epsilon\,w_{2}+\dots\right)\partial_{\textnormal{z}}\Tilde{\pi}& \\
        +\gamma\Bar{\pi}\left(\epsilon\nabla_{\textnormal{m}}\cdot\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)+\epsilon^2\nabla_{\textnormal{s}}\cdot\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)+\frac{\epsilon}{\Bar{p}}\partial_{\textnormal{z}}\left[\Bar{p}\left(\alpha_{\textnormal{w}}w_{1}+\epsilon\,w_{2}+\dots\right)\right]\right)& \\
        +\epsilon^2\gamma\Gamma\Tilde{\pi}\left[\epsilon\nabla_{\textnormal{m}}\cdot\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)+\epsilon^2\nabla_{\textnormal{s}}\cdot\left(\mathbf{v}_{\textnormal{h,0}}+\epsilon\mathbf{v}_{\textnormal{h,1}}+\dots\right)+\epsilon\partial_{\textnormal{z}}\left(\alpha_{\textnormal{w}}w_{1}+\epsilon\,w_{2}+\dots\right)\right]& \\
        =\frac{\gamma{\color{red}\left(\Bar{\pi}+\epsilon^2\Tilde{\pi}\right)}}{1+\epsilon\Bar{\Theta}+\epsilon^2\Tilde{\Theta}}\left(\epsilon^2\alpha_{\textnormal{w}}Q_{\Theta,2}+\epsilon^3Q_{\Theta,3}+\dots\right)\,.&
    \end{aligned}
\end{align*}
\end{document}

在此处输入图片描述

相关内容