这是我的代码:
\begin{align*}
\smash[b]{\underbrace{\overline{xx\cdots x}}_\text{$2n$}}-\smash[b]{\underbrace{\overline{yy\cdots y}}_\text{$n$}}
& = (\overline{\underbrace{zz\cdots z}_{n}})^2 \\
\dfrac{x(10^{2n}-1)}{9} - \dfrac{y(10^n-1)}{9}
& = \dfrac{z^2(10^n-1)^2}{9^2}\\9x(10^n+1) - 9y
& = z^2(10^n-1)\\9x \cdot 10^n + (9x-9y)
& = z^2 \cdot 10^n - z^2
\end{align*}
答案1
或许是这个。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{4}
&\qquad&
\smash[b]{\underbrace{\overline{xx\cdots x}}_\text{$2n$}}-\smash[b]{\underbrace{\overline{yy\cdots y}}_\text{$n$}} & = (\overline{\underbrace{zz\cdots z}_{n}})^2 \\
\Leftarrow\kern-4pt\Rightarrow&&
\dfrac{x(10^{2n}-1)}{9} - \dfrac{y(10^n-1)}{9}
& = \dfrac{z^2(10^n-1)^2}{9^2}\\
\Leftarrow\kern-4pt\Rightarrow&&
9x(10^n+1) - 9y
& = z^2(10^n-1)\\
\Leftarrow\kern-4pt\Rightarrow&&
9x \cdot 10^n + (9x-9y)
& = z^2 \cdot 10^n - z^2
\end{alignat*}
\end{document}
正如 Zarko 所说,还提供了一个双头双线的amspackage
宏。但是,它比我上面提供的自编宏要窄得多。\Leftrightarrow
\Leftarrow\kern-4pt\Rightarrow
答案2
您还可以\ArrowBetweenLines
尝试mathtools
:
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\begin{document}
\begin{alignat*}{2}
& & \smash[b]{\underbrace{\overline{xx\cdots x}}_\text{$2n$}}-\smash[b]{\underbrace{\overline{yy\cdots y}}_\text{$n$}}
& = (\overline{\underbrace{zz\cdots z}_{n}})^2 \\
\ArrowBetweenLines
& & \dfrac{x(10^{2n}-1)}{9} - \dfrac{y(10^n-1)}{9} & = \dfrac{z^2(10^n-1)^2}{9^2}\\%
\ArrowBetweenLines
& & 9x(10^n+1) - 9y & = z^2(10^n-1)\\
\ArrowBetweenLines
& & 9x \cdot 10^n + (9x-9y) & = z^2 \cdot 10^n - z^2
\end{alignat*}
\end{document}