我想画一个像这样的长 \mapsto 状箭头:
\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}
但是,这样不太美观。长箭的箭头太小,箭尾太大。
你能教我如何调整箭头吗?
答案1
\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}
答案2
另一个选择是使用内置mapsto
箭头tikz-cd
。这样做的好处是你不必猜测箭的长度:
\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}