I use tikz-cd
to draw my commutative diagrams, like the following:
\documentclass{scrartcl}
\usepackage{tikz-cd}
\begin{document}
\begin{equation}
\begin{tikzcd}[row sep=scriptsize]
0 \rar & X \dar["\tilde p", hook, dashed] \rar["x", hook]\ar["\scriptscriptstyle(*)", phantom, dr] & Y \dar["p", two heads]\rar["y", two heads] & Z \dar[equal]\rar & 0\\
0 \rar & U \rar["u"', hook] & V \rar["v"', two heads] & W \rar & 0
\end{tikzcd}
\end{equation}
\end{document}
I want to draw the picture for the dual diagram, which is obtained by the following transformations:
- hooks and double headed tips are exchanged.
- labels of dashed arrows obtain a prime, unless:
- they have a bar or a tilde. In this case, bars and tildes are exchanged.
- $x$- and $y$-coordinates are inverted.
Is it possible to just write down the primal diagram and let TikZ build the dual one automatically?
\arrow[r,<other options>]
is clearer than\rar
\dar
and similar.\documentclass...
and ending with\end{document}
. That well make it easier to experiment with your code, without having to guess the packages loaded and so on... Thanks!