-2

I am trying to draw the following block diagram using TikZ... No way :( Can anyone help me?enter image description here

Thank you so much!!!

Kevin
  • 429
  • 1
    Please provide an MWE indicating what you have tried and where you're still having trouble! Otherwise, questions that just post an image and say "Draw this for me" don't get a good reception here... You can also look at the tutorials in the PGF manual. Thanks :-) – darthbith Apr 09 '15 at 18:54
  • 3
    Please give the OP some time to improve the post... –  Apr 09 '15 at 19:12
  • Review the tikz diagrams here and I believe one of them will provide you with an working example that you can modify into your desired diagram. http://www.texample.net/tikz/examples/tag/block-diagrams/ – R. Schumacher Apr 09 '15 at 20:00
  • With Ignasi's answer I understood tikz diagrams! I had this a strange error with the package, but this post solved it http://tex.stackexchange.com/questions/166024/does-pgf-3-0-0-on-ctan-not-have-the-arrows-meta-tikz-library – Kevin Apr 09 '15 at 20:25

2 Answers2

11

Try to understand this one. It's just one possibility.

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning,arrows.meta}

\begin{document}
\begin{tikzpicture}[block1/.style={draw, minimum width=3cm, minimum height=1.8cm},
                    block2/.style={draw, minimum width=1cm, minimum height=.8cm},
                    >=Stealth]
\node[block1,label=above:lol] (b1) {lol};
\node[block1, right=5cm of b1] (b2) {lol2};
\path ([yshift=-3mm]b1.center)--([yshift=-3mm]b2.center) node [midway,block2] (b3) {lol3};
\draw[->] ([yshift=3mm]b1.east)--node[above] {c} ([yshift=3mm]b2.west);
\draw[->] ([yshift=-3mm]b1.east)--node[below] {a} (b3.west);
\draw[<-] ([yshift=-3mm]b2.west)--node[below] {b} (b3.east);
\draw[->] (b2.east)--++(0:1cm) node[right] {thanks!};
\end{tikzpicture}
\end{document}

enter image description here

Ignasi
  • 136,588
10

Just for fun, with Plain TeX:

\obeylines\obeyspaces\let =\ \tt\catcode`\_=11
   lol
_________                c               ____________
|        |---------------------------->|            |
|  lol   |             ______          |   lol2     |----> thanks!
|        |-----------> | lol3|-------->|            |
|________|             |_____|         |____________|
              a                   b
\bye

Alternatively, with eplain's verbatim facilities:

\input eplain

\verbatim|
   lol
_________                c               ____________
|        |---------------------------->|            |
|  lol   |             ______          |   lol2     |----> thanks!
|        |-----------> | lol3|-------->|            |
|________|             |_____|         |____________|
              a                   b
|endverbatim
\bye

Both give the requested result:

enter image description here

The space between the underscore characters is a result of the font used (here, cmtt).

Paul Gessler
  • 29,607
  • 2
    You definitely have too much spare time to use Plain TeX ;-) (+1) –  Apr 13 '15 at 23:52
  • 1
    @ChristianHupfer "sometimes the old ways are best". :-) Shorter code and looks closer to the desired result than the accepted answer... ;-) – Paul Gessler Apr 14 '15 at 00:02
  • Let me make an educated guess: The OP used ASCII characters to generate the block diagram? ;-) –  Apr 14 '15 at 00:04