Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to draw a system architecture as in the picture below enter image description here

Can you help me?

share|improve this question
2  
Easiest way: Use Inkscape and export to TikZ-code. –  Uwe Ziegenhagen May 13 '13 at 5:56
    
@UweZiegenhagen: You can't expect the results of this conversion to be easy to work with - if you want to work with Inkscape, save the processor cycles and export as PDF. –  Charles Stewart May 16 '13 at 9:55

3 Answers 3

Maybe something along these lines with TikZ:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes.multipart,shapes.geometric,fit,scopes}
\tikzset{
  >= latex,
  el/.style={ellipse, draw, text width=8em, align=center},
  rs/.style={rectangle split, draw, rectangle split parts=#1},
  ou/.style={draw, inner xsep=1em, inner ysep=1ex, fit=#1}
}
\begin{document}
\begin{tikzpicture}
  \matrix[matrix of nodes, row sep=5ex, column sep=1em] (mx) {
    INPUT:& |[el]| newspaper text \\
    ANALYSER& |[rs=3]|
    lexical tagger\nodepart{two}morphological analyser\nodepart{three}parser \\
    & |[el]| {analysed newspaper text} \\
    SIMPLIFIER& |[rs=2]| syntactic simplifier\nodepart{two}lexical simplifier \\
    OUTPUT:& |[el]| simplified newspaper text \\
  };
  \node[ou=(mx-2-2)] (ana) {};
  \node[ou=(mx-4-2)] (sim) {};
  {[->]
  \draw(mx-1-2)edge(ana) (ana)edge(mx-3-2) (mx-3-2)edge(sim) (sim)edge(mx-5-2);
  }
\end{tikzpicture}
\end{document}

enter image description here

Or, with MetaPost (compile with lualatex):

\documentclass{article}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
input boxes;

nodesep := 15; % space between nodes
ellipdy := 15; % the dy of ellipses

vardef cuta(suffix a, b) = % from Peter Grogono's MetaPost reference manual
  drawarrow a.c -- b.c cutbefore bpath.a cutafter bpath.b;
enddef;

beginfig(1);
  % define contents
  circleit.txt("newspaper text");
  boxjoin(a.sw = b.nw; a.se = b.ne);
  boxit.lext("lexical tagger");
  boxit.mora("morphological analyser");
  boxit.prsr("parser");
  boxjoin();
  circleit.atxt("analysed text");
  boxjoin(a.sw = b.nw; a.se = b.ne);
  boxit.syns("syntactic simplifier");
  boxit.lexs("lexical simplifier");
  boxjoin();
  circleit.stxt("simplified text");

  % position and tweak
  txt.dy  = ellipdy;
  atxt.dy = ellipdy;
  stxt.dy = ellipdy;
  lext.ne - lext.nw = (110,0);
  txt.s  - lext.n = (0,nodesep);
  prsr.s - atxt.n = (0,nodesep);
  atxt.s - syns.n = (0,nodesep);
  lexs.s - stxt.n = (0,nodesep);

  % draw everything
  picture pic; pic := image(drawboxed(lext, mora, prsr););
  draw pic; draw bbox pic;
  drawboxed(txt, atxt);
  pic := image(drawboxed(syns, lexs));
  draw pic; draw bbox pic;
  drawboxed(stxt);
  cuta(txt, lext);
  cuta(prsr, atxt);
  cuta(atxt, syns);
  cuta(lexs, stxt);
endfig;
end;
\end{mplibcode}
\end{document}

enter image description here

share|improve this answer
    
Oh, right: a matrix of nodes is itself a node. Had forgotten about that convenience! –  Matthew Leingang May 13 '13 at 11:40
    
Thank you so much, morbusg. I love your solution. –  Just life May 13 '13 at 12:12

Run with pdflatex -shell-escape

\documentclass{article}
\usepackage{auto-pst-pdf}
\usepackage{pst-node}
\begin{document}

\begin{psmatrix}[rowsep=5mm]
    INPUT:    & \psovalbox{newspaper text} \        ANALYSER  & \psframebox{\tabular{|c|}\hline lexical tagger\\\hline
                morphological analyser\\\hline parser\\\hline\endtabular}\                  & \psovalbox{\parbox{2.5cm}{analysed newspaper text}} \        SIMPLIFIER& \psframebox{\tabular{|c|}\hline syntactic simplifier\\\hline
                 lexical simplifier\\\hline \endtabular}\        OUTPUT:   & \psovalbox{\parbox{2.5cm}{simplified newspaper text}}
\ncline{->}{1,2}{2,2}\ncline{->}{2,2}{3,2}            
\ncline{->}{3,2}{4,2}\ncline{->}{4,2}{5,2}            
\end{psmatrix}

\end{document}

Example output

share|improve this answer

Tikz is the best choise, lots of examples you can built on like this one:

http://www.texample.net/tikz/examples/assignment-structure/

share|improve this answer

Your Answer

 
discard

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.