# How to draw commutative diagrams in Obsidian?

I am a Math PhD student and I really need to draw commutative diagrams in Obsidian. I have searched all the posts but found nothing about this. I am wondering if we could load 2xyjax or tikzcd or other packages by ourselves?

1 Like

The “standard” CD environment from the amscd MathJax extension works:

$$\begin{CD} A @>a>> B\\ @VVbV @VVcV\\ C @>d>> D \end{CD}$$


2 Likes

Thanks! I know that amscd is part of Mathjax extension. However, it doesn’t support triangular arrows, which are very common in commutative diagrams. Do you have any ideals about triangular arrows?

Only XyJax comes to mind, but I’m not even sure if it will work with MathJax v3.

Oh! So in obsidian ,we are working with MathJax v3. Do you know where we could edit the extensions of it?

I just found that XyJax is compatible with MathJax v3. GitHub - sonoisa/XyJax-v3: Xy-pic extension for MathJax version 3

But I am not sure how to edit the extensions.

You could possibly create/suggest a plugin for XyJax.

For the time being there is still the option to create diagrams with an external tool and embed them in your notes. One can do it using LaTeX with e.g. tikzcd package or a visual editor like tikzcd-editor, quiver, or maybe draw.io.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.