Diagram of Short exact sequences

Can someone help me. I want to write morphisms between all objects

$\setlength{\arraycolsep}{1pt} \begin{array}{*{9}c} 0 &\Lrightarrow & X & \Lrightarrow & Y & \Lrightarrow & Z & \Lrightarrow & 0\\ & & \Ldownarrow & & \Ldownarrow & & \Ldownarrow & & \\ 0 &\Lrightarrow & X^' & \Lrightarrow & Y^' & \Lrightarrow & Z^' & \Lrightarrow & 0 \end{array}$

• Sorry, what has your question to do with tikz-pgf? And please consider providing a compilable code.
– user121799
Jan 9 '19 at 23:19
• What are \Lrightarrow and \Ldownarrow? Jan 9 '19 at 23:22
• It is compilable in my latex. Do you have another code from titkz-pgf?
– user178971
Jan 9 '19 at 23:28
• Bernard to be honest, I do not know, I just need to write morphisms between objects.
– user178971
Jan 9 '19 at 23:29

Here are solutions with xy and tikz-cd. The idea is the same, think on them as matrices.

\documentclass{report}
\usepackage[all]{xy}
\usepackage{tikz-cd}
\begin{document}
$\xymatrix{ 0 \ar[r] & A \ar[d]_-{\alpha} \ar[r]^-{f} & B \ar[d]_-{\beta} \ar[r]^-{g} & C \ar[d]^-{\gamma} \ar[r] & 0 \\ 0 \ar[r] & A' \ar[r]_-{f'} & B' \ar[r]_-{g'} & C' \ar[r] & 0 }$
$\begin{tikzcd} 0 \arrow[r] & A \arrow[d, "\alpha"] \arrow[r, "f"] & B \arrow[d, "\beta"] \arrow[r, "g"] & C \arrow[d, "\gamma"] \arrow[r] & 0 \\ 0 \arrow[r] & A' \arrow[r, "f'"] & B' \arrow[r, "g'"] & C' \ar[r] & 0 \end{tikzcd}$
\end{document}

• @DiegoHavez, welcome. Jan 9 '19 at 23:31

A solution with psmatrix:

\documentclass{article}

\usepackage{pst-node}
\usepackage{auto-pst-pdf}

\begin{document}

$\everypsbox{\scriptstyle} \begin{psmatrix}[rowsep=1cm, colsep=1.2cm] 0 & A & B & C & 0 \\ 0 & D & B' & C' & 0 %% Arrows \psset{linewidth=0.5pt, arrows=->, arrowinset=0.12, nodesep=3pt, shortput=nab, labelsep=1.5pt} \ncline{1,1}{1,2}\ncline{1,4}{1,5}\ncline{2,1}{2,2}\ncline{2,4}{2,5} \ncline{1,2}{1,3}^{f}\ncline{1,2}{2,2}_{\alpha} \ncline{1,3}{1,4}^{g}\ncline{1,3}{2,3}_{\beta}\ncline{1,4}{2,4}_{\gamma} \ncline{2,2}{2,3}_{f'} \ncline{2,3}{2,4}_{g'} \end{psmatrix}$%

\end{document}


• Do you know the meaning of nc in ncline command? I mean, line is clear; c maybe for column; and what about n? Jan 10 '19 at 0:11
• nc is for node connection, as far as I know. Jan 10 '19 at 0:18
• ahh, makes sense. Nice! Jan 10 '19 at 0:19