# Drawing \mapsto arrow in TikZ

I wanted to draw a long \mapsto-like arrow like this:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\node (sequence) at (0,0) {
$\sqrt[4]{2} \mapsto \sqrt[4]{2}\,i \mapsto -\sqrt[4]{2} \mapsto -\sqrt[4]{2}\,i$
};
\draw[|->,looseness=3]
(sequence.mid east)
to[out=0,in=0] (sequence.south east)
-- (sequence.south west)
to[out=180,in=180] (sequence.mid west);
\end{tikzpicture}

\end{document}

But, that's not pretty. The head of long arrow is too small and the tail is too big.

Could you teach me how to adjust the arrow?

\documentclass{article}
\usepackage{tikz}

\usetikzlibrary{arrows.meta}
\tikzset{|/.tip={Bar[width=.8ex,round]}}

\begin{document}

\begin{tikzpicture}
\node (sequence) at (0,0) {
$\sqrt[4]{2} \mapsto \sqrt[4]{2}\,i \mapsto -\sqrt[4]{2} \mapsto -\sqrt[4]{2}\,i$
};
\draw[|->,looseness=3]
(sequence.mid east)
to[out=0,in=0] (sequence.south east)
-- (sequence.south west)
to[out=180,in=180] (sequence.mid west);
\end{tikzpicture}

\end{document}

Another option is to use the built-in mapsto arrow from tikz-cd. The advantage here is that you don't have to guess lengths for the arrow:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[
column sep=1em,
every arrow/.style={draw,mapsto}
]
\sqrt[4]{2}\ar[r] & \sqrt[4]{2}\,i\ar[r] & -\sqrt[4]{2}\ar[r] & -\sqrt[4]{2}\,i
\arrow[lll,rounded corners,to path={ -| ([xshift=2ex,yshift=-2.5ex]\tikztostart.east) -- ([xshift=-2ex,yshift=-2.5ex]\tikztotarget.west) |- (\tikztotarget) }]
\end{tikzcd}

\end{document}

• How beautiful! The attached picture has a hangnail(?) at the below right corner. But, actually, this code gives a very clean and elegant picture. Jun 28 '15 at 10:06
• @P.-S.Park True. I've fixed the problem; the code is even shorter now! Jun 29 '15 at 22:39
• How is it possible to use tikz-cd's mapsto arrow in a normal tikz environment as well? Apr 21 '20 at 16:54