align 環境内で \text を揃える

align 環境内で \text を揃える

align 環境内でテキスト スニペットを揃えることは可能ですか? シンボルと対応するテキストを垂直に揃えたいと思います。

そうでない場合、代替案はありますか?

コード:

\documentclass{article}

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

\begin{document}
\section{Variables and Parameters}
\begin{align*}
    &\Bar{p}=\Bar{\pi}^{\frac{1}{\left(\gamma\Gamma\right)}}\qquad\qquad\qquad\qquad\text{Text A},\\
    &\Theta=1+\epsilon\Bar{\Theta}\left(Z\right)+\epsilon^2\Tilde{\Theta}\qquad\text{Text B},\\
    &\pi=\Bar{\pi}\left(Z\right)+\epsilon^2\Gamma\Tilde{\pi}\qquad\qquad\text{Text C},\\
    &\mathbf{\Omega}=\mathbf{k}\left(f_{0}+\epsilon\beta\,y_{\textnormal{s}}\right)\qquad\text{Text D}
\end{align*}
\end{document}

答え1

環境を採用したソリューションを次に示しますalignat*

\Bar{\pi}^{\frac{1}{\left(\gamma\Gamma\right)}}また、(a)を置き換え、(b) allおよびsizing ディレクティブを\bar{\pi}^{1/(\gamma\Gamma)}削除したことにも注意してください(これらは何も役に立つことはなく、適切な水平間隔を台無しにするため)。\left\right

ここに画像の説明を入力してください

\documentclass{article}
\usepackage{amsmath} % for 'alignat*' env. and '\text' macro

\begin{document}

\section{Variables and Parameters}

\begin{alignat*}{2}
    \bar{p} &= \bar{\pi}^{1/(\gamma\Gamma)}
    &\qquad& \text{Text A}, \\
    \Theta &= 1+\epsilon \bar{\Theta}(Z)+\epsilon^2 \tilde{\Theta}
    && \text{Text B}, \\
    \pi &= \bar{\pi}(Z)+\epsilon^2 \Gamma \tilde{\pi}
    && \text{Text C}, \\
    \mathbf{\Omega} &= \mathbf{k}(f_{0}+\epsilon\beta y_{\mathrm{s}})
    && \text{Text D}
\end{alignat*}

\end{document}

関連情報