0

I want to make these two diagrams separately. I tried inserting these two images but they don't look like nice. How can I create them by my own.

enter image description here

enter image description here

I appreciate any help. Thanks in advance.

2 Answers2

3

This approach using tikz will produce the same diagram with more open code: it is easier to comment out, delete or edit the individual lines.

a

\documentclass[12pt,a4paper]{article}

\usepackage{tikz} \usetikzlibrary{positioning}

\begin{document}

\begin{tikzpicture}[auto, node distance=1.0cm, block/.style={ minimum height=2em, minimum width=3em} ]
% upper figure nodes
\node[block] (Zeup){0}; \noderight=of Zeup, block{$A_R$}; \noderight=of ARup, block{$B_R$}; \nodebelow=of ARup, block{$X_R$}; \noderight=of BRup, block{exact};

% lower figure nodes
\node[below=of XRup, block](ARlo){$A_R$};
\node[left= of ARlo, block](Zelo){0};
\node[right=of ARlo, block](BRlo){$B_R$};
\node[below=of ARlo, block](XRlo){$X_R$};
\node[right=of BRlo, block](exlo){exact}; 

% upper  arrows
\draw[->] (Zeup) -- (ARup);
\draw[->] (ARup) -- node[pos=0.5,above]{$\theta$}(BRup);
\draw[->] (ARup) -- node[pos=0.5,left]{$\phi$} (XRup);

% lower arrows
\draw[->] (Zelo) -- (ARlo);
\draw[->] (ARlo) -- node[pos=0.5,above]{$\theta$}(BRlo);
\draw[->] (ARlo) -- node[pos=0.5,left]{$\phi$} (XRlo);
\draw[->] (BRlo) -- node[pos=0.5,below,sloped]{$\Psi$} (XRlo);   

\end{tikzpicture}

\end{document}

Simon Dispa
  • 39,141
2

This is easy with tikz-cd and mathtools:

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

\begin{document}

[ \begin{tikzcd} 0 \arrow[r] & \prescript{}{R}{A} \arrow[r, "\theta"] \arrow[d, "\phi", swap] & \prescript{}{R}{B}\arrow[dl, "\Psi"] \% & \prescript{}{R}{X} \end{tikzcd} ]

\end{document}

enter image description here

Bernard
  • 271,350
  • I really appreciate your help. But I forgot to write that I need the subscript to be on the right not on the left. That is, I need to wrtie A_R, B_R, and X_R. Another thing, how can I create the first diagram in my question with the row of \psi deleted. – Hussein Eid Mar 16 '22 at 14:56
  • Just delete \arrow[dl, "\Psi"] from your script. – SebGlav Mar 16 '22 at 15:41