[Tex/LaTex] Drawing commutative diagram in tex

diagrams

I want to draw this digram below in Latex and thank you .enter image description here

Best Answer

You may want to learn tikz-cd:

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

\begin{document}
\[
\begin{tikzcd}[row sep=2.5em]
A' \arrow[rr,"f'"] \arrow[dr,swap,"a"] \arrow[dd,swap,"g'"] &&
  B' \arrow[dd,swap,"h'" near start] \arrow[dr,"b"] \\
& A \arrow[rr,crossing over,"f" near start] &&
  B \arrow[dd,"h"] \\
C' \arrow[rr,"k'" near end] \arrow[dr,swap,"c"] && D' \arrow[dr,swap,"d"] \\
& C \arrow[rr,"k"] \arrow[uu,<-,crossing over,"g" near end]&& D
\end{tikzcd}
\]
\end{document}

The only trick is to draw the "g" arrow later (and in the opposite direction), so that it can properly cross over the "k'" arrow that would be drawn later if the "g" arrow started from "A" instead of "C".

enter image description here

Related Question