I have a long set of lecture notes where the commutative diagrams are written in xy
using the \xymatrix
format. I would like to switch over to tikz-cd
. The syntax for the two are pretty similar with some minor differences, so it is conceivable to me that someone has either written, or could easily write, a script that will automatically convert all \xymatrix{...}
occurrences to a tikz-cd
format that works for all non-exotic commutative diagrams. If somebody knows of such a script or can give me such a script, I would be very happy!
Note that I am willing to do the effort of fixing diagrams that involve curved lines or other non-standard things if that is too hard for a script.
I am not working on a unix machine although I have access to a Macbook that I could open in unix if necessary.
Here is a sample in \xymatrix{...}
\xymatrix{\Delta_{q-2}\ar[r]^{F_{q-1}^i}\ar[d]_{F_{q-1}^{j-1}}& \Delta_{q-1}\ar[d]^{F_q^j}\\
\Delta_{q-1}\ar[r]_{F_{q}^i} & \Delta_q}
And the corresponding tikz-cd
\begin{tikzcd}
\Delta_{q-2}\ar{r}{F_{q-1}^i}\ar{d}[swap]{F_{q-1}^{j-1}}& \Delta_{q-1}\ar{d} {F_q^j}\\
\Delta_{q-1}\ar{r}[swap]{F_{q}^i} & \Delta_q
\end{tikzcd}
Please note that I have at least 50 occurrences of xymatrix so I would like a script that converts a whole file.
xymatrix
and a sample of how you'd like it to look intikz-cd
?