[Tex/LaTex] How to create a diagram that looks a little like this

diagrams

So I need to put some diagrams into my homework. And I have already created some of them on paper but I just can't get them into latex. Does anyone know how I'm able to get a diagram that looks a little like this into a .tex file. enter image description here

I want to be able to determine on my own where the arrows go and such. I also only need 4 nodes (a, b, c and d). How can I do this in texmaker?

any help is appreciated.

Best Answer

The  psmatrix environment from pst-node can be used to make easily such diagrams. The loops are obtained with the \nccircle command, which links a node to itself counter-clockwise:

\documentclass[border=5pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pst-node, pst-arrow, auto-pst-pdf}%

\begin{document}

\sffamily
\def\psrowhooki{\hskip 4em}
\begin{psmatrix}[rowsep=1.2cm, colsep=1.2cm]
  [name=a] a & [name=c] c \\
  [name=b] b & [name=d] d & [name=e] e \\
  %%%%% Arrows
  \psset{nodesep=6pt, shortput =nab, arrows=->, arrowinset=0.12, arcangle=20}%
  \nccircle[angle=80,]{<-}{a}{0.4cm}
  \nccircle[angle=120]{b}{0.4cm}
  \nccircle[angle=-40]{<-}{c}{0.4cm}
  \nccircle[angle=120]{d}{0.45cm}
  \nccircle[angle=-110]{<-}{e}{0.4cm}
  \ncarc{c}{d}
  \ncarc{d}{c}%
  \ncline{d}{e}
\end{psmatrix}

\end{document} 

enter image description here

Related Question