0

enter image description here

I am using the tikz-cd package. How can I draw the above diagram in LaTeX?

1
  • 1
    It is just a 4x4 matrix, the rest is explained in the tikzcd manual (note this site is not a please do this for me service, it is for concrete questions).
    – daleif
    Feb 10 '20 at 13:33
5

Just because I wanted to see exactly how fast one could do this with the package manual in hand, here is the diagram in tikz-cd:

\documentclass[a4paper]{article}

\usepackage{tikz-cd}
\usetikzlibrary{babel} % incase you're using babel
\begin{document}

\[
  \begin{tikzcd}
    {}
    &
    {}
    &
    A
    \ar[ld,hook']
    \ar[rd,"f"',"\cong"]
    &
    {}
    \\
    B'
    \ar[r,hook]
    &
    B
    \ar[rd,"s"',"\cong"]
    \ar[rdd,bend right,"j"']
    &
    {}
    &
    C
    \ar[ld,hook',"h"]
    \ar[ldd,bend left,"k"]
    \\
    {} & {} & D & {}
    \\
    {} & {} & E & {}
    \\
  \end{tikzcd}
\]
\end{document}
  • Bendy arrows, manual page 3
  • Hook arrow, manual page 4 note the syntax for hook up/down
  • The syntax for the labels including the "..."' syntax is covered on page 2 in the manual

See also egregs answer for tips on how to further adjust the look

enter image description here

1
  • 1
    It's nice when all relevant information is in the first four pages of a manual :-D
    – campa
    Feb 10 '20 at 13:50
6

Just a few adjustments to make the square a square and the bottom vertical row a bit longer.

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}

\begin{document}

\begin{equation*}
\begin{tikzcd}[row sep=2.5em]
&& A \arrow[ld,hook'] \arrow[rd,"f","\cong"']
\\
B' \arrow[r,hook] &
B \arrow[rd,"\cong","g"'] \arrow[rdd,bend right,"j"'] &&
C \arrow[ld,hook',"h"] \arrow[ldd,bend left,"k"]
\\
&& D \arrow[d]
\\[0.5em]
&& E
\end{tikzcd}
\end{equation*}

\end{document}

enter image description here

With "<symbol>"' (note the quote) we say to typeset the symbol on the opposite side to the arrow; the default one is the left side as determined for rivers. With hook' the hook is reversed (it usually bends to the left side). Similarly one determines when bend left or bend right is needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.