答案1
你需要一个gather*
这里:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
\forall (y_1, x_1), (y_2, x_2) \in \mathcal R_f^{-1}: y_1 = y_2 \implies x_1 = x_2 \\
\Updownarrow \\
\forall (x_1, y_1), (x_2, y_2) \in \mathcal R_f: y_1 = y_2 \implies x_1 = x_2.
\end{gather*}
\end{document}
答案2
并非完全居中,但相当简单:使用&
环境align*
来设置对齐的中心点。\Updownarrow
然后在两列中的第一列内右对齐:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\forall (y_1, x_1), (y_2, x_2) \in \mathcal R_f^{-1}&: y_1 = y_2 \implies x_1 = x_2
\\ \Updownarrow \\
\forall (x_1, y_1), (x_2, y_2) \in \mathcal R_f&: y_1 = y_2 \implies x_1 = x_2.
\end{align*}
\end{document}
答案3
在我看来,存在一个专用的命令,mathtools
它比居中箭头看起来更好看:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{alignat*}{2}
& & \forall (y_1, x_1), (y_2, x_2) \in \mathcal R_f^{-1}&: y_1 = y_2 \implies x_1 = x_2 \\
\ArrowBetweenLines
& & \forall (x_1, y_1), (x_2, y_2) \in \mathcal R_f&: y_1 = y_2 \implies x_1 = x_2.
\end{alignat*}
\end{document}