I'm loving using tikz-cd to draw compiler correctness diagrams, but I can't manage to get quite the same arrows for relations that I'm using in the text. In particular, I'm not sure how to get \Mapsto
in a tikz-cd diagram.
I did try combining arrow options to get \Mapsto
to work:
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
M \rar[Rightarrow] \dar[maps to] & N \dar[maps to, Rightarrow] \\
M' \rar[Rightarrow, maps to] & N'
\end{tikzcd}
\end{document}
But this wound up less than satisfactory (on TeXLive 2013):
As you can see, depending on the order I give the arguments, the bar is either missing (there should be one on the N-to-N' arrow) or comically huge. I assume this is a bug? Any known workaround?
tikz-cd
doesn’t provide amaps to
arrow for a doubled line, the arrows|
andcm |
(which is internally used here) does use the “doubled” line width and not the simple one. Looks like you need either to correct the arrow code forcm |
/|` or introduce a new arrow.mapsto
/maps to
) “can be superimposed with other arrows.” If it's not intended that I can mix the maps to and Rightarrow options, I think that's a documentation bug at any rate. In any case, I guess I'm shy about diving into arrow code and hoping there's a simpler way. Also IIUC there's an impedance mismatch between tikz-cd arrows, which combine the specification of the path with that of the arrow tip (I guess this is the source of the maybe-bug?), and tikz arrows (really just tips?).