# How to draw a commutative diagram on math.stackexchange.com? [duplicate]

I want to draw a rectangle commutative diagram, but I do not know how. The MathJax codes I find on the internet do not work here. I tried the following:

$\xymatrix \mathbb{Z}/p^n\mathbb{Z}\ar[r]^{\theta_{n+1,\alpha}} \ar[d] U_1/U_{n+1}\ar[d] \\ \mathbb{Z}/p^{n-1}\mathbb{Z} \ar[r]^{\theta_{n,\alpha}} \\ U_1/U_n$


## marked as duplicate by Xam, Shailesh, José Carlos Santos, Glorfindel, HarambeNov 11 '17 at 9:32

• Older question: How to draw a commutative diagram? (You can find there link to the presheaf site. If you are used to xypic syntax, a possibility is to use that website and include the picture in the post.) – Martin Sleziak Nov 6 '17 at 4:24

The package you want to use is not supported on this site, sorry. You could use AMScd instead:

$\require{AMScd}$
\begin{CD}
\mathbb{Z}/p^n\mathbb{Z} @>{\theta_{n+1,\alpha}}>> U_1/U_{n+1}\\
@VVV @VVV\\
\mathbb{Z}/p^{n-1}\mathbb{Z} @>{\theta_{n,\alpha}}>> U_1/U_n
\end{CD}


$\require{AMScd}$ \begin{CD} \mathbb{Z}/p^n\mathbb{Z} @>{\theta_{n+1,\alpha}}>> U_1/U_{n+1}\\ @VVV @VVV\\ \mathbb{Z}/p^{n-1}\mathbb{Z} @>{\theta_{n,\alpha}}>> U_1/U_n \end{CD}

I hope I got it right; I just read your source and my brain is not the most reliable compiler.

For some more details see the relevant answer in the main MathJax thread.

• Thank you. You got it right! – Cornman Nov 5 '17 at 21:41
• You are welcome. I am glad to know it worked out. – quid Nov 5 '17 at 21:42