TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am newbie in this TEX world and I would like to draw something like this: alt text

But I don't know where to start. I tried using: \usepackage{pstricks,pst-node,pst-tree} but when I try to use it I got many errors, am I in the right way?

share|improve this question
there are various solutions to this problem. I guess what happened when you used pstricks is that you still tried to compile with pdflatex. this is with pstricks not sirectly possible. try to compile to PS or use a package such as tikz that works directly with pdflatex – Martin H Jan 13 '11 at 12:03
up vote 17 down vote accepted

This is a solution with tikz that looks like your screenshot given above


%load tikz
%load additional library


%start tikzpicture,define a node style
width=3cm,minimum height=1cm}]
%start to define nodes relative to each other
\node[mystyle] (A) {A};
\node[mystyle] (B) [below=of A] {B};
\node[mystyle] (C) [below=of B] {C}; 
\node[mystyle] (D) [below=of C] {D};

%second column with a bit of a distance
\node[mystyle,node distance=2cm] (E) [right=of A] {E};  
\node[mystyle,node distance=2cm] (F) [right=of B] {F};
\node[mystyle,node distance=2cm] (G) [right=of D] {G};       

\node[mystyle,node distance=2cm] (H) [right=of E] {H};  

%empty node for the gap in column 2 row 3
\node[minimum width =3cm,node distance=2cm] (J) [right=of C] {};  
\node[mystyle,node distance=2cm] (K) [right=of J] {K};       

%connect the nodes
\draw[->] (A) -- (B);
\draw[->] (B) -- (C);
\draw[->] (C) -- (D);
\draw[->] (G) -- (G);
\draw[->] (E) -- (F);
\draw[->] (F) -- (G);
\draw[->] (G) -| (K);
\draw[->] (K) -- (H);
\draw[->] (C) -- (K);



alt text

share|improve this answer
I forgot to connect D and G put that is an easy task for you I guess :) – Martin H Jan 13 '11 at 12:33
@Martin: I removed those additional indentations in your code block. OK? – Hendrik Vogt Jan 13 '11 at 12:48
Thanks! it... it works! ;-) – nacho4d Jan 13 '11 at 13:09
nevermind I just found it out \begin{scope}[very thick]\draw[]...\end{scope} – nacho4d Jan 13 '11 at 13:25
@nacho4d: if you just want to change the arrows (and not the thickness of the lines), take a look at the arrows library in TikZ which defines a lot of different arrowheads. – Loop Space Jan 13 '11 at 13:37

a solution with symbolix names for cells.



[name=A]\psFBox{A} &  [name=B]\psFBox{B} & [name=C]\psFBox{whatever}\\
[name=a]\psFBox{a} &  [name=b]\psFBox{me}& [name=c]\psFBox{c}\\
[name=Aa]\psFBox{Aa}&                    & [name=cC]\psFBox{c} 
\ncline{->}{A}{B} \ncline{->}{B}{C}


if ayou want to run it with pdflatex then have a look here: http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput#autopstpdf

alt text

share|improve this answer
didn't work;( I got this: ./Chapters/Chapter2.tex:37: Undefined control sequence. <recently read> \c@lor@to@ps l.37 [name=A]\psFBox{A} & [name=B]\psFBox{B} & [name=C]\psFBox{whatever}\? – nacho4d Jan 13 '11 at 12:14
@nacho4d: see link above. use package auto-pst-pdf and run pdflatex -shell-escape file – Herbert Jan 13 '11 at 12:20
Thanks @Herbert I suppose I need more experience to realize that in the future. – nacho4d Jan 13 '11 at 13:06
@nacho: use the usual latex-dvips-ps2pdf road to get the result. Do not use pdflatex. – pluton Jan 13 '11 at 14:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.