基本上,我想做的是
其中每個方程式由一個空格分隔,該空格包含稍微向左的單或雙垂直箭頭。
但是,如果有另一種首選方法,我將不勝感激。謝謝。
答案1
mathtools
提供
\ArrowBetweenLines[〈symbol〉 ]
\ArrowBetweenLines*[ 〈symbol〉 ] %% symbol on right side.
<symbol>
可以是任何箭頭符號。
代碼:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{alignat*}{2}
&& y&=mx+b\\
\ArrowBetweenLines%
&& x&=\frac{y-b}{m}
\end{alignat*}
\begin{alignat}{2}
&& y&=mx+b\\
\ArrowBetweenLines%
&& x&=\frac{y-b}{m}
\end{alignat}
\begin{alignat*}{2}
y&=mx+b &&\\
\ArrowBetweenLines*[\downarrow]%
x&=\frac{y-b}{m} &&
\end{alignat*}
\begin{alignat}{2}
y&=mx+b &&\\
\ArrowBetweenLines*[\uparrow]%
x&=\frac{y-b}{m} &&
\end{alignat}
\end{document}
有關詳細信息,請參見mathtools
手冊第 21 頁,第 3.4.6 節。
答案2
只需搜尋您喜歡的一些箭頭(我正在使用\Updownarrow
它根本不需要任何套件)並將其添加到align
環境的額外行中。為了將其放在左側,只需在 - 分隔符號前面添加一個\quad
或即可。\quadd
&
% arara: pdflatex
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align*}
y&=mx+b\\
\Updownarrow\quad&\\
x&=\frac{y-b}{m}
\end{align*}
\begin{align}
y&=mx+b\\
\Updownarrow\quad&\notag\\
x&=\frac{y-b}{m}
\end{align}
\end{document}
當您要求其他方法來做到這一點時,我將使用以下兩個版本之一:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[y=mx+b \quad\Rightarrow\quad x=\frac{y-b}{m}\]
\begin{align*}
y&=mx+b \shortintertext{which can be transformed to:}
x&=\frac{y-b}{m}
\end{align*}
\end{document}