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 have now spend hours by creating this figure - without luck.

I have tried different types of tikz, tikzpicture, pstricks and multido usepackage. Can you maybe help me? I would really appreciate it. enter image description here

share|improve this question
2  
Have you been able to do any part of this? Can you show us that code? –  Torbjørn T. Apr 18 at 18:46
    
It would only be the preamble, you get. I start and start over again, and that is pissing me off. :) I know how to make the arrows into the boxes, but my problem is to make the boxes and make it available to put text in them. –  A. F. Apr 18 at 18:50
1  
Even the preamble and the arrows would save people some of the work involved in helping you. Even just the framework of a document shows you've made an effort and prevents anybody who wants to help having to start over from scratch. –  cfr Apr 19 at 3:22

2 Answers 2

up vote 14 down vote accepted

One option using TikZ; the fit library was used just to draw the outer frame; depending on the actual requirements, this can be done without the library (see second example code below):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}

\begin{document}

\begin{tikzpicture}[
mytext/.style={
  draw,
  text width=#1,
  align=center,
  minimum height=1.5cm
  },
ar/.style={
  ->,
  >=latex
  }  
]
\node[mytext=3cm,minimum height=8cm] (left)
  {2 text text text};
\node[mytext=4cm,anchor=north west] 
  at ([xshift=1.5cm]left.north east) (middle1)
  {4 text text text};
\node[mytext=4cm,anchor=west] 
  at ([xshift=1.5cm]left.east) (middle2)
  {5 text text text};
\node[mytext=4cm,anchor=south west] 
  at ([xshift=1.5cm]left.south east) (middle3)
  {6 text text text};
\node[mytext=3cm,minimum height=8cm,anchor=north west] 
  at ([xshift=1.5cm]middle1.north east) (right)
  {8 text text text};
\coordinate (aux) at ([yshift=3cm]middle1);
\node[mytext=4cm,dashed,minimum height=0.8cm,anchor=north] 
  at (aux) (middle0)
  {3 text text};  
\node[mytext=3cm,dashed,anchor=north] 
  at (left.center|-aux) (left0)
  {1 text text};  
\node[mytext=3cm,dashed,anchor=north] 
  at (right.center|-aux) (right0)
  {7 text text};
\node[draw,inner sep=10pt,fit={(left0) (right)}] {};

\foreach \Valor in {1,2,3}
{
\draw[ar]
  (left.east|-middle\Valor.west) -- (middle\Valor.west);    
\draw[ar]
  (middle\Valor.east) -- (right.west|-middle\Valor.west);    
}
\end{tikzpicture}

\end{document}

enter image description here

Without the fit library (the result is the same as in the picture above):

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[
mytext/.style={
  draw,
  text width=#1,
  align=center,
  minimum height=1.5cm
  },
ar/.style={
  ->,
  >=latex
  }  
]
\node[mytext=3cm,minimum height=8cm] (left)
  {2 text text text};
\node[mytext=4cm,anchor=north west] 
  at ([xshift=1.5cm]left.north east) (middle1)
  {4 text text text};
\node[mytext=4cm,anchor=west] 
  at ([xshift=1.5cm]left.east) (middle2)
  {5 text text text};
\node[mytext=4cm,anchor=south west] 
  at ([xshift=1.5cm]left.south east) (middle3)
  {6 text text text};
\node[mytext=3cm,minimum height=8cm,anchor=north west] 
  at ([xshift=1.5cm]middle1.north east) (right)
  {8 text text text};
\coordinate (aux) at ([yshift=3cm]middle1);
\node[mytext=4cm,dashed,minimum height=0.8cm,anchor=north] 
  at (aux) (middle0)
  {3 text text};  
\node[mytext=3cm,dashed,anchor=north] 
  at (left.center|-aux) (left0)
  {1 text text};  
\node[mytext=3cm,dashed,anchor=north] 
  at (right.center|-aux) (right0)
  {7 text text};
\draw
  ([shift={(-10pt,10pt)}]left0.north west)
    rectangle
  ([shift={(10pt,-10pt)}]right.south east);

\foreach \Valor in {1,2,3}
{
\draw[ar]
  (left.east|-middle\Valor.west) -- (middle\Valor.west);    
\draw[ar]
  (middle\Valor.east) -- (right.west|-middle\Valor.west);    
}
\end{tikzpicture}

\end{document}
share|improve this answer
    
First of all, thank you very much. I have two questions: 1) How to make a black frame outside the figure, as showed? 2) If I would like to the figure and the text a bit smaller - and not std. setting, how can I do that? Thanks again. –  A. F. Apr 19 at 7:58
    
I solved the problem. Thank you again!! –  A. F. Apr 19 at 10:23
    
[thick,scale=0.6, every node/.style={transform shape}] –  A. F. Apr 19 at 10:23
\documentclass{article}
\usepackage{pst-node,pst-blur}    
\begin{document}    
\newpsstyle{Dashed}{linestyle=dashed,shadow=false,blur=false,fillstyle=solid}

\begin{pspicture}[showgrid=false,arrowscale=2,shadow,blur,framearc=0.05](-1,-1)(14,11)
\psframe[blur=0,framearc=0,fillcolor=black!10,fillstyle=solid](-0.5,-0.5)(13.5,10.5)
\psTextFrame[style=Dashed](0,8.5)(3,10){1 text text}
\psTextFrame(0,0)(3,8){2 text text text}
%
\psTextFrame[style=Dashed](4.5,9)(8.5,10){3 text text text}
\psTextFrame(4.5,6.5)(8.5,8){4 text text text}
\psTextFrame(4.5,3.25)(8.5,4.75){5 text text text}
\psTextFrame(4.5,0)(8.5,1.5){6 text text text}
%
\psTextFrame[style=Dashed](10,8.5)(13,10){7 text text}
\psTextFrame(10,0)(13,8){8 text text text}
%
\psset{shadow=false}
\psline{->}(3,7.25)(4.5,7.25)\psline{->}(8.5,7.25)(10,7.25)
\psline{->}(3,4)(4.5,4)      \psline{->}(8.5,4)(10,4)
\psline{->}(3,0.75)(4.5,0.75)\psline{->}(8.5,0.75)(10,0.75)
\end{pspicture}

\end{document}

enter image description here

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.