1

Here is the diagram I want to draw:

enter image description here

Could anyone tell me how can I draw it? and also I want some of the arrows to be forward and backward above each other.

  • What you try so far? Where you stuck in your effort? See, if https://tex.stackexchange.com/questions/568689/using-a-not-equal-to-sign-as-an-arrow-in-tikz-cd-commutative-diagram can help you. – Zarko Jan 18 '21 at 21:17

1 Answers1

3

This code should work for your diagram (it doesn't have the little gap in the arrow, but I can add that if you need—or, if you want to give it a try yourself, you can use the description key from tikz-cd):

\documentclass{standalone}
\usepackage{tikz-cd}
\usepackage{amsfonts}

\begin{document} \begin{tikzcd}[row sep=large,column sep=large] \mathbb Z \ar[r,"m"] \ar[dd,"\frac nd"] & \mathbb Z \ar[r] \ar[dd,"\frac md"] & \mathbb Z/m \ar[r] \ar[d,dotted, no head] & 0 \ar[dd,equal] \ & & \tikz\node[draw,circle,inner sep=2pt]{$\ell$}; \ar[d,dotted] & \ Z \ar[r,"n"] & \mathbb Z \ar[r] & \mathbb Z/n \ar[r] & 0, \end{tikzcd} \end{document}

If you want arrows pointing in different directions, you should check out the documentation for the tikz-cd library here: http://mirrors.ibiblio.org/CTAN/graphics/pgf/contrib/tikz-cd/tikz-cd-doc.pdf. (Just as an example, if you replace \ar[r,"m"] in the first node with \ar[r,\leftrightarrow,"m"], you should get an arrow point both left and right.)

boink
  • 198