iv'e been trying to create this diagram in latex, what is the easiest and most flexible way to come up with this diagram using tikz?. Thanks!

Context Diagram

  • 1
    Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help. – user31729 Oct 11 '14 at 8:10

This is another attempt.

enter image description here



\usetikzlibrary{shapes.multipart,arrows, fit,positioning}
\tikzset{block/.style = {rectangle, draw, text width=4cm, text centered, rounded corners, minimum height=2.5cm},
block2/.style = {rectangle, draw, text width=4cm, text centered, minimum height=2.5cm},
arrow/.style={draw, -latex'}}
        \node[block,draw=none] (a) at (0,0) {MANUAL\\
        \draw (a.north west) -- (a.north east);
        \node[anchor=south, at=(a.north) ] (b) {0};                  
        \node[fit=(a) (b),block](c){};
\node[block2, above left=1cm and 1cm of c](c1) {SD\\DEPARTMENT};
\node[block2, below left=1cm and 1cm of c](c2) {RECRUITER};
\node[block2, above right=1cm and 1cm of c](c3) {CALL OUT\\PERSONNEL};
\node[block2, below right=1cm and 1cm of c](c4) {APPLICANT};

\draw[arrow](c1.south) |-node[pos=0.5,above right]{\tiny FINAL INTERVIEW}([yshift=0.5cm]c.west);
\draw[arrow]([xshift=0.5cm]c1.south) |-node[pos=0.5,above right]{\tiny JOB VACANCY}([yshift=1cm]c.west);
\draw[arrow]([xshift=-0.5cm]c.north) |-node[pos=0.5,above left]{\tiny INITIAL REPORT}(c1.east);

\draw[arrow](c.north) |-node[pos=0.5,above right]{\tiny CALL OUT LIST}([yshift=0.5cm]c3.west);
\draw[arrow]([xshift=-1cm]c3.south) |-node[pos=0.5,above left]{\parbox{1.5cm}{\tiny INVITATION DETAILS}}([yshift=1cm]c.east);
\draw[arrow]([xshift=-0.5cm]c3.south) |-node[pos=0.5,above left]{\tiny SCHEDULE DETAILS}(c.east);

\draw[arrow](c2.north) |-node[pos=0.5,above right]{\tiny INITIAL INTERVIEW}([yshift=-1cm]c.west);
\draw[arrow]([xshift=-1cm]c2.north) |-node[pos=0.5,above right]{\tiny JOB REQUIREMENTS}([yshift=-0.5cm]c.west);
\draw[arrow]([xshift=-0.5cm]c.south) |-node[pos=0.5,above left]{\parbox{2cm}{\tiny JOB VANCANCY  NOTIFICATION}}([yshift=-1cm]c2.east);
\draw[arrow]([xshift=-1cm]c.south) |-node[pos=0.5,above left]{\parbox{2cm}{\tiny RECRUITMENT REPORTS  NOTIFICATION}}(c2.east);

\draw[arrow](c4.north) |-node[pos=0.5,above left]{\tiny APPLICATION DETAILS}([yshift=-1cm]c.east);
\draw[arrow]([xshift=1cm]c4.north) |-node[pos=0.5,above left]{\tiny INVITATION RESPONSE}([yshift=-0.5cm]c.east);

\draw[arrow](c.south) |-node[pos=0.5,above right]{\parbox{2cm}{\tiny APPLICATION STATUS}}([yshift=-1cm]c4.west);
\draw[arrow]([xshift=0.5cm]c.south) |-node[pos=0.5,above right]{\parbox{2cm}{\tiny INTERVIEW SCHEDULE}}([yshift=-0.5cm]c4.west);
\draw[arrow]([xshift=1cm]c.south) |-node[pos=0.5,above right]{\parbox{2cm}{\tiny INVITATION}}([yshift=0.5cm]c4.west);
\draw[arrow]([xshift=1.5cm]c.south) |-node[pos=0.5,above right]{\parbox{2cm}{\tiny JOB ANNOUNCEMENTS}}([yshift=1cm]c4.west);
| improve this answer | |
  • OK, Welcome, just to be one the safe side, I copied and pasted my code, recompiled it again. Yes, it runs fine on my windows. – Jesse Oct 11 '14 at 14:27
  • @Deeeyb -- I just checked the tikz-er2 manual. I am not sure what you mean by installed tikz-er2 before. To use it, all you need is to use \usepackage{tikz-er2} in the preamble before \begin{document}. So similar notions applied, to use tikz which my code uses, one uses \usepackage{tikz}. instead. I think there are other problems causing the blank page. – Jesse Oct 11 '14 at 15:02
  • Apologies! it worked! lol. i just omitted something. Thanks anyways! – Deeeyb Oct 11 '14 at 15:14

Maybe this will help you. This is the most flexible way to do it. Probably there are many TikZ packages for drawing diagrams like this that require less code, but you won't have this flexibility. Here you can change everything (coordinates, shapes, arrow types, colors, positions, ...). Most of the code is just copy/paste/change attributes.

%fitting only picture

%fitting to tikz picture


%defining styles
\tikzstyle{rec}=[rectangle,draw=black,align=center,line width =.4mm,minimum height =5cm,minimum width= 5cm,fill=gray!10,font=\bfseries, node distance = 0mm];
\tikzstyle{lin}=[-stealth,line width =.4mm];
\tikzstyle{rec1}=[rectangle,draw=black,align=center,line width =.4mm,minimum height =2cm,minimum width= 3cm,fill=gray!10,font=\bfseries, node distance = 0mm];

% middle node
\node[rec,rounded corners,thick] at (0,0) (a) {};
%line across middle node
\draw[-] ($(a.east) + (0,1.5cm)$) -- ($(a.west) + (0,1.5cm)$);
%zero on top of the middle node
\node[anchor=north,below=of a.north,yshift=.8cm,font=\bfseries]{\large 0};
% other text in middle node
\node[anchor=south,above=of a.south,yshift=-.2cm,align = center,font=\bfseries]{MANUAL \\ SGS PH-LEGAZPI \\ RECRUITMENT AND \\ SELECTION SYSTEM};

\node[rec1,above right= 1cm and 4cm of a] (callout) {CALL OUT \\ PERSONEL};
\coordinate (point) at ($(a.north) + (1cm,0)$);
\draw[lin] (point) --  (point |- callout.west) -- node[above] {\scalebox{.6}{CALL OUT LIST}} (callout.west);

\coordinate (point1) at ($(callout.south) + (-1cm,0)$);
\coordinate (point2) at ($(a.east) + (0,2cm)$);
\draw[lin] (point1) -- (point1 |- point2) -- node[above] {\scalebox{.6}{INVITATION DETAILS}} (point2);

\coordinate (point3) at ($(callout.south) + (-.5cm,0)$);
\coordinate (point4) at ($(a.east) + (0,1.3cm)$);
\draw[lin] (point3) -- (point3 |- point4) -- node[above] {\scalebox{.6}{SCHEDULE DETAILS}} (point4);

\node[rec1,below right= 1cm and 4cm of a] (applicant) {APPLICANT};

\coordinate (point5) at ($(applicant.west) + (0,-.8cm)$);
\draw[lin] (a.south) --  (a.south |- point5) -- node[above] {\scalebox{.6}{APPLICANT STATUS}} (point5);

\coordinate (point6) at ($(a.south) + (.5cm,0)$);
\coordinate (point7) at ($(applicant.west) + (0,-.3cm)$);
\draw[lin] (point6) --  (point6 |- point7) -- node[above] {\scalebox{.6}{INTERVIEW SCHEDULE}} (point7);

\coordinate (point8) at ($(a.south) + (1cm,0)$);
\coordinate (point9) at ($(applicant.west) + (0,.2cm)$);
\draw[lin] (point8) --  (point8 |- point9) -- node[above] {\scalebox{.6}{INVITATION}} (point9);

\coordinate (point10) at ($(a.south) + (1.7cm,0)$);
\coordinate (point11) at ($(applicant.west) + (0,.7cm)$);
\draw[lin] (point10) --  (point10 |- point11) -- node[above] {\scalebox{.6}{JOB ANNOUNCEMENTS}} (point11);

\coordinate (point12) at ($(applicant.north) + (-.5cm,0)$);
\coordinate (point13) at ($(a.east) + (0,-2.2cm)$);
\draw[lin] (point12) --  (point12 |- point13) -- node[above] {\scalebox{.6}{INVITATION RESPONSE}} (point13);

\coordinate (point14) at ($(applicant.north) + (.5cm,0)$);
\coordinate (point15) at ($(a.east) + (0,-1.6cm)$);
\draw[lin] (point14) --  (point14 |- point15) -- node[above] {\scalebox{.6}{APPLICANT DETAILS}} (point15);

\node[rec1,below left= 1cm and 4cm of a] (recruiter) {RECRUITER};

\coordinate (point16) at ($(a.south) + (-1cm,0)$);
\coordinate (point17) at ($(recruiter.east) + (0,-.7cm)$);
\draw[lin] (point16) --  (point16 |- point17) -- node[above] {\scalebox{.6}{JOB VACANCY NOTIFICATION}} (point17);

\coordinate (point18) at ($(a.south) + (-1.9cm,0)$);
\coordinate (point19) at ($(recruiter.east) + (0,.3cm)$);
\draw[lin] (point18) --  (point18 |- point19) -- node[above] {\scalebox{.6}{RECRUITMENT REPORTS}} (point19);

\coordinate (point20) at ($(a.west) + (0,-2cm)$);
\draw[lin] (recruiter.north) --  (recruiter.north |- point20) -- node[above] {\scalebox{.6}{INITIAL INTERVIEW}} (point20);

\coordinate (point21) at ($(recruiter.north) + (-1cm,0)$);
\coordinate (point22) at ($(a.west) + (0,-1.5cm)$);
\draw[lin] (point21) --  (point21 |- point22) -- node[above] {\scalebox{.6}{JOB REQUIREMENTS}} (point22);


\node[rec1,above left= 1cm and 4cm of a] (sddepartment) {SD DEPARTMENT};

\coordinate (point23) at ($(a.north) + (-1cm,0)$);
\draw[lin] (point23) --  (point23 |- sddepartment.east) -- node[above] {\scalebox{.6}{INITIAL REPORT}} (sddepartment.east);

\coordinate (point24) at ($(sddepartment.south) + (1cm,0)$);
\coordinate (point25) at ($(a.west) + (0,2cm)$);
\draw[lin] (point24) --  (point24 |- point25) -- node[above] {\scalebox{.6}{JOB VACANCY}} (point25);

\coordinate (point26) at ($(sddepartment.south) + (-.2cm,0)$);
\coordinate (point27) at ($(a.west) + (0,1cm)$);
\draw[lin] (point26) --  (point26 |- point27) -- node[above] {\scalebox{.6}{FINAL INTERVIEW}} (point27);


This is the result:Diagram created in Latex

| improve this answer | |

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.