I need my tikz-cd
diagrams to have arrows (vertical and horizontal) that mimic \mapsto^*
to match the relation in the text. The closest I've managed is to add a label {*}
at [pos=1]
:
\documentclass{article}
\usepackage{tikz,tikz-cd,stmaryrd}
\begin{document}
\[
\begin{tikzcd}
M \dar \rar[maps to] & N \dar[maps to][pos=1]{*} \\
M' \rar[maps to][pos=1]{*} & N'
\end{tikzcd}
\]
\[
M' \longmapsto^* N'
\]
\end{document}
Not horrible, but definitely off. I can get it closer by using pos=1.1
, but I'd prefer a less fiddly solution (that won't break if the arrow's length changes, for instance). It would be especially helpful if I can define a /.style
for this arrow so that I can change my existing ones (they already use a custom style).
decoration
TikZ library. But it's just an idea.pos=1
replace{*}
with{}
and trylabel={[pos=1,inner sep=0,outer sep=0]45:${}^*$}
in the second one. To be honest the tikz version is better in my opinion.label=
as part of the label options, which defeats the purpose since I don't want to have a label at all (unless there's a real label).