如何得到下面的輸出?

如何得到下面的輸出?

如何獲得以下輸出(無需手動新增空格)?我想我應該使用對齊環境,但我無法獲得以第二行中的相應元素為中心的域和共域。我需要一個通用演算法,每當我需要定義地圖時我都會使用它。 在此輸入影像描述

請注意如何存在三個獨立的中心部分,即包含其元素的域、箭頭和包含地圖影像的共域。

答案1

我覺得這不是特別有吸引力,但它是:

\documentclass{article}
\usepackage{amsmath,amssymb,array}

\newcommand{\numberset}[1]{\mathbb{#1}}
\newcommand{\R}{\numberset{R}}
\newcommand{\C}{\numberset{C}}

\begin{document}

\begin{equation*}
\setlength{\arraycolsep}{0pt}% disable standard intercolumn spaces
\renewcommand{\arraystretch}{1.5}% more room between rows
\begin{array}{r c >{{}}c<{{}} c}
\Phi\colon{} & \R\times\R & \longrightarrow & \C\times\R=\R^3 \\
             & (u,v)      & \longmapsto     & (e^{iu},v)=(\cos u,\sin u,v)
\end{array}
\end{equation*}

\end{document}

在此輸入影像描述

l最後一列的版本略有不同:

\begin{equation*}
\setlength{\arraycolsep}{0pt}% disable standard intercolumn spaces
\renewcommand{\arraystretch}{1.5}% more room between rows
\begin{array}{r c >{{}}c<{{}} l}
\Phi\colon{} & \R\times\R & \longrightarrow & \C\times\R=\R^3 \\
             & (u,v)      & \longmapsto     & (e^{iu},v)=(\cos u,\sin u,v)
\end{array}
\end{equation*}

在此輸入影像描述

答案2

您也可以使用套件來做到這一點eqparbox

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{eqparbox}
\newcommand{\eqmathbox}[2][M]{\eqmakebox[#1]{$\displaystyle#2$}}

\newcommand{\numberset}[1]{\mathbb{#1}}
\newcommand{\R}{\numberset{R}}
\newcommand{\C}{\numberset{C}}

\begin{document}

\begin{align*}
\Phi\colon\eqmathbox[L]{\R\times\R} & \longrightarrow \eqmathbox[R]{\C\times\R=\R^3} \\
\eqmathbox[L]{(u,v)} & \longmapsto \eqmathbox[R]{(e^{iu},v)=(\cos u,\sin u,v)}
\end{align*}

\end{document} 

在此輸入影像描述

相關內容