答案1
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
&&\dfrac{a}{b} &= 0.5\\
\implies&&a &= 0.5b\\
\implies&&ka &=0.5kb\\
\implies&\quad&k^2a^2 &= 0.25k^2 b^2
\end{alignat*}
\end{document}
也可以使用 TABstack 或aligned
块轻松完成。
\documentclass[12pt]{article}
\usepackage{tabstackengine,amsmath}
\TABstackMath
\setstackgap{S}{8pt}
\begin{document}
\[
\alignShortstack{
&&\dfrac{a}{b} =& 0.5\\
\implies&&a =& 0.5b\\
\implies&&ka =&0.5kb\\
\implies&&k^2a^2 =& 0.25k^2 b^2
}
\]
\[
\begin{aligned}
&&\dfrac{a}{b} &= 0.5\\
\implies&&a &= 0.5b\\
\implies&&ka &=0.5kb\\
\implies&&k^2a^2 &= 0.25k^2 b^2
\end{aligned}
\]
\end{document}
答案2
使用 aligned 和 alignat:
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{aligned}
& & \frac{a}{b} & = 0.5 \\
\implies & & a & = 0.5b \\
\implies & & ka & = 0.5kb \\
\implies & & k^2a^2 & =0.25k^2 b^2
\end{aligned}
\]
or
\[
\begin{aligned}
&\quad & \frac{a}{b} & = 0.5 \\
\implies & & a & = 0.5b \\
\implies & & ka & = 0.5kb \\
\implies & & k^2a^2 & =0.25k^2 b^2
\end{aligned}
\]
or
\begin{alignat*}{3}
&\quad & \frac{a}{b} & = 0.5 \\
\implies & & a & = 0.5b \\
\implies & & ka & = 0.5kb \\
\implies & & k^2a^2 & = 0.25k^2 b^2
\end{alignat*}
\end{document}