
我正在嘗試將函數的映射箭頭對齊,但乳膠似乎只是對齊箭頭並弄亂數字的空間,或者對齊數字但不對齊箭頭。程式碼如下:
\begin{align*}
\sigma= \left\{
\begin{array}{lr}
\sqrt[8]{2} \longmapsto \zeta\sqrt[8]{2}
\\
i \longmapsto i
\end{array}
\right.
&&
\tau= \left\{
\begin{array}{lr}
\sqrt[8]{2} &\longmapsto&\sqrt[8]{2}
\\
{i} &\longmapsto& -i
\end{array}
\right.
\end{align*}
我想要的是箭頭對齊,但數字保持在原位。
答案1
您可以使用aligned
(並不是cases
這不是正確的工具)。或者,如果您不喜歡(但在我看來,這是最好的)array
的輸出。aligned
無論如何,不要用於align*
單行顯示。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Right and left alignment
\begin{equation*}
\sigma=
\left\{
\begin{aligned}
\sqrt[8]{2} & \longmapsto \zeta\sqrt[8]{2} \\
i & \longmapsto i
\end{aligned}
\right.
\qquad
\tau=
\left\{
\begin{aligned}
\sqrt[8]{2} & \longmapsto \sqrt[8]{2} \\
i & \longmapsto -i
\end{aligned}
\right.
\end{equation*}
Center alignment
\begin{equation*}
\setlength{\arraycolsep}{0pt}
\renewcommand{\arraystretch}{1.2}
\sigma=
\left\{
\begin{array}{ c c c }
\sqrt[8]{2} & {} \longmapsto {} & \zeta\sqrt[8]{2} \\
i & {} \longmapsto {} & i
\end{array}
\right.
\qquad
\tau=
\left\{
\begin{array}{ c c c }
\sqrt[8]{2} & {} \longmapsto {} & \sqrt[8]{2} \\
i & {} \longmapsto {} & -i
\end{array}
\right.
\end{equation*}
Left alignment
\begin{equation*}
\setlength{\arraycolsep}{0pt}
\renewcommand{\arraystretch}{1.2}
\sigma=
\left\{
\begin{array}{ l c l }
\sqrt[8]{2} & {} \longmapsto {} & \zeta\sqrt[8]{2} \\
i & {} \longmapsto {} & i
\end{array}
\right.
\qquad
\tau=
\left\{
\begin{array}{ l c l }
\sqrt[8]{2} & {} \longmapsto {} & \sqrt[8]{2} \\
i & {} \longmapsto {} & -i
\end{array}
\right.
\end{equation*}
\end{document}
\mapsto
這裡用 代替 也是一樣的\longmapsto
。
為什麼?因為我覺得\longmapsto
不太好,太寬了。
答案2
歡迎來到 TeX:SE!
透過使用套件cases
中定義的環境:amsmath
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\sigma = \begin{cases}
\sqrt[8]{2} & \longmapsto \zeta\sqrt[8]{2} \\
i & \longmapsto i
\end{cases}
&&
\tau = \begin{cases}
\sqrt[8]{2} & \longmapsto \sqrt[8]{2} \\
i & \longmapsto -i
\end{cases}
\end{align*}
\end{document}