# Is it possible to use tikzcd code in MO posts?

Question : Is it possible to use tikzcd code in MO posts?

There are information for drawing diagrams using AMScd

$\require{AMScd}$
\begin{CD}
A @>a>> B\\
@V b V V= @VV c V\\
C @>>d> D
\end{CD}


but could not find one for tikzcd

I want to compile following tikz code.

\begin{tikzcd}
&&\mathcal{H}_1\ar[dd,shift left]\ar[dd,shift right]\\
&
P\ar[dl,"\pi"']\ar[dr,"a_R"]
& \\[1.5em]
B & & \mathcal{H}_0
\end{tikzcd}

• Copy into a PDF, take a screenshot, select, trim, and so on, upload. – Asaf Karagila Jul 1 '18 at 14:48
• That is really not easy. I tried for some questions which you can see from my recent question.. That is really time consuming which I would not prefer.. any other suggestions ?? @AsafKaragila – Praphulla Koushik Jul 1 '18 at 15:03
• Nothing about using tikz is easy. Why should using tikz on MO be easier? – Asaf Karagila Jul 1 '18 at 15:57
• @AsafKaragila I don’t have any preference for tikzcd or anything for that matter.. most of the questions asking for help in commutative diagrams code has this tikzcd so I am trying to get used to that.. – Praphulla Koushik Jul 1 '18 at 16:57
• Some related posts on a nearby site: How to draw a commutative diagram? and Can we support TikZ picture rendering? – Martin Sleziak Jul 2 '18 at 5:20

To the best of my knowledge the only type of commutative diagrams supported by MathJax is AMSCd.

Some info on commutative diagrams can be also found here: How to draw a commutative diagram? There is also this feature request: Can we support TikZ picture rendering? (Both posts are from Mathematics Meta.) There is also a feature request related to xypic on this meta, it is already marked as : Diagrams in MathJax via xypic.js.

If you want to use some other packages for commutative diagrams, such as xypic or tikzcd, the solution could be to create the diagram elsewhere and then convert it into a picture and include the picture in your post. As mentioned in the comments, if you have an installation of LaTeX which contains all necessary packages, you can do this locally on your computer. There are also some online solutions.

For xypic, you can render your diagrams on http://presheaf.com/. I have learned about this site from Bruno Stonek's answer to this question: How to draw a commutative diagram?

Some websites which might be useful when creating tikzcd diagrams online might be https://tikzcd.yichuanshen.de/ or https://patrickmassot.github.io/tikzcdedit/. (For TikZ, the website http://homepages.inf.ed.ac.uk/cheunen/freetikz/ might be useful. But this site serves somewhat different purpose, it is not specifically for commutative diagrams.) I have learned about those sites in Category Theory chatroom and MathJax chatroom (on Mathematics site).