3

Please, help me in typesetting the following diagram, I'm not an expert in drawing with LaTeX.

enter image description here

8

I have used the advice of the excellent user @egreg. You can change the tip of the vectors by looking at this link: Is it possible to change the size of an arrowhead in TikZ/PGF?. I believe that the diagram that uses the arrows in that way is from the package xymatrix.

enter image description here

\documentclass{article}
\usepackage{newtxtext,newtxmath}
\usepackage{tikz-cd,amssymb}

\begin{document}


\begin{tikzcd}[column sep=huge,row sep=small] 
1 \arrow[rd, "\alpha"] \\ & 3 & 4 \arrow[l, "\gamma"'] \\ 
2 \arrow[ru, "\beta"'] \end{tikzcd} 

\end{document}

FIRST ADDENDUM

enter image description here

\documentclass{article}
\usepackage{newtxtext,newtxmath}
\usepackage{tikz-cd,amssymb}
\newcommand{\pmat}[4]{\begin{pmatrix} #1 & #2 \\ #3 & #4\end{pmatrix}}
\begin{document}


\begin{tikzcd}[column sep=huge,row sep=small] 
1 \arrow[rd, "\pmat{-1}{5}{5}{1}"] \\ & 3 & 4 \arrow[l, "\gamma"'] \\ 
2 \arrow[ru, "\beta"'] \end{tikzcd} 

\end{document}

SECOND ADDENDUM From a suggestion of @Bernard's comment I have added psmallmatrix environment (from mathtools).

enter image description here

\documentclass{article}
\usepackage{newtxtext,newtxmath,mathtools}
\usepackage{tikz-cd,amssymb}
\newcommand{\smat}[4]{\begin{psmallmatrix} #1 & #2 \\ #3 & #4\end{psmallmatrix}}
\begin{document}


\begin{tikzcd}[column sep=huge,row sep=small] 
1 \arrow[rd, near start, "\smat{-1}{5}{5}{1}"] \\ & 3 & 4 \arrow[l, "\gamma"'] \\ 
2 \arrow[ru, "\beta"'] \end{tikzcd} 

\end{document}
  • it was wonderful. Thank you for your help @egreg – tuce Jun 18 '18 at 21:28
  • how can I write matrices instead of alpha, gamma, beta on arrows @egreg , – tuce Jun 18 '18 at 21:36
  • how can I write matrices instead of alfa beta gamma on arrows @sebastiano – tuce Jun 18 '18 at 21:38
  • on the same diagram you could write on the arrows as a matrix. – tuce Jun 18 '18 at 21:49
  • no problem @sebastion you are perfect :) – tuce Jun 18 '18 at 22:32

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.