我有以下 LaTeX 格式的数学文本源,我想将所有等式 (=) 对齐,使它们一个在另一个的正下方。我该怎么做?请参阅此问题的最后两行。有人可以将这个等式链重写到 ALIGN 环境中吗?我被它难住了。
\documentclass{article}
\usepackage{newtxtext}
\usepackage{newtxmath}
\usepackage{amsmath}
\begin{document}
It is clearer if you define $q_i = p_i \cdot f_i \cdot \overline{f}_i$
This is how it should be.
Then
$p \cdot f = p \cdot b_i \cdot f_i \qquad \text{(since } f = b_i \cdot f_i)$
$= d^*_i \cdot p_i \cdot f_i \qquad\text{(by naturality)}$
$= d^*_i \cdot p_i \cdot f_i \cdot \overline{f}_i \cdot f_i$ = \qquad (as $\overline{f}_i \cdot f_i = 1$)
$= d^*_i \cdot q_i \cdot f_i \qquad \text{(by the definition of} q_i)$
$= q \cdot b_i \cdot f_i \qquad \text{(by naturality)}$
$= q \cdot f \text{(by naturality)}$
Hope that helps.
\end{document}
答案1
更新
文本左对齐
\documentclass[]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
&\text{It is clearer if you define} &q_i &= p_i \cdot f_i \cdot \overline{f}_i\\
&\text{This is how it should be} & p \cdot f &= p \cdot b_i \cdot f_i\\
&\text{then} &&= d^*_i \cdot p_i \cdot f_i \qquad \text{(by neutrality)}
\end{align}
\end{document}
文本右对齐
\documentclass[]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\text{It is clearer if you define}& &q_i &= p_i \cdot f_i \cdot \overline{f}_i\\
\text{This is how it should be}& & p \cdot f &= p \cdot b_i \cdot f_i\\
\text{then} &&&= d^*_i \cdot p_i \cdot f_i \qquad \text{(by neutrality)}
\end{align}
\end{document}