2

i'm not completely new to Latex/Tikz but for my previous tikzpictures it was enough specifying coordinates and connecting them or using arc's and some simple node commands. I searched alot for similar tikzpicture and couldn't believe nodody is using tikz for things like this. So i decided to ask my question here. I hope you can help me. I tried to do it with powerpoint but it's doesn't look good at all, especially in a letex document. enter image description here

i would like to replace the rectangles of text3, text4 and text8 by this. enter image description here

Thanks in advance

Florian

edit 250617:

     \documentclass{minimal}
    \usepackage{tikz}
   \usetikzlibrary{arrows,positioning} 
   \tikzset{
    %Define standard arrow tip
    >=stealth',
    %Define style for boxes
    mybox1/.style={
           rectangle,
           rounded corners,
           draw=black, very thick,
           text width= 1cm,
           minimum height=5 cm,
           minimum width =5 cm,
           text centered},
     mybox2/.style={
        rectangle,
        rounded corners,
        draw=black, very thick,
        text width= 1cm,
        minimum height=1 cm,
        minimum width =3 cm,
        text centered},
%    bigbox/.style={draw,minimum width = 10cm, inner sep=20pt,label={[shift={(-3ex,3ex)}]south east:#1}
}

\begin{document}

\begin{tikzpicture}
 %nodes
 \node[mybox1] (box1) {text 9};
 \node[mybox2, inner sep=5pt,left=0.5cm of box1]
 (box2) {text4};
 \node[mybox2, inner sep=5pt, below=0.5cm of box2] (box3) {text8};
 \node[mybox2, inner sep=5pt, above=0.5cm of box2] (box4) {text3};
 \draw (box2) --(box1);
 \draw (box3.east) --(box1.west); % how can i tell effective where i want to connect?
 \draw (box4.east) |-(box1);    % i want to connect with a square angle but with an staigt line (e.g. powerpoint figure)

% try to do the big rectangle for text12
% \node[bigbox=text12, fit=(box1)(box2)(box3)(box4)] (D) {}; %doesn't work (i tried to put the 4 boxes into one big box and put the text12 to bottom right)

\end{tikzpicture}


\end{document}

i seem to not be able to post the result as i don't have enough reputation.

i didn't post a minimum example because i felt i'm on the wrong train. I didn't expect anyone to do my case but i hoped you could show me a thread where something similar was already solved

  • If there are already similar question, just give me the link for it :) – Michael Obermeist Jun 24 '17 at 18:29
  • And what have you tried so far? (Why is the "thanks in advance" name different from your username? Just curious) The Tutorials 3 and 5, "A Petri-Net for Hagen" and "Diagrams as Simple Graphs" respectively both talk about node styles. Maybe you should have a look at them in the manual: ctan.org/pkg/pgf – Huang_d Jun 24 '17 at 18:47
  • Since you have tried something so far, please add a minimal working example (MWE). – CarLaTeX Jun 24 '17 at 19:16
  • These node shapes certainly look a lot like those provided by the signal shape from \usetikzlibrary{shapes}. This is documented p 713 in [the PGF-TikZ manual](ctan.org/pkg/pgf) – marsupilam Jun 24 '17 at 20:26
  • @MichaelObermeist, see my answer below, now it provide complete MWE. It is design on basis of images given in your question. – Zarko Jun 25 '17 at 11:32
7

Off-topic:

  • questions without MWE (Minimal (non) Working Example) is of type "do-it-for-me", which unlike to be answer here

On-topic:

  • shapes, which you looking for, can be defined as follows:

   box/.style = {draw, inner sep=2mm, 
              minimum height=#1,  minimum width=22mm},
 box/.default = 6mm,
    SR/.style = {box, signal, signal to=east, on chain},
   SLR/.style = {box, signal, signal to=east and west, on chain},

(for details of signal shape see section 67.4 Symbol Shapes in TikZ & PGF manual, v3.0.1a, pp. 712 -- 714) and then used as:

\node (n1) [SR]     {text 3};
\node (n2) [SR]     {text 4};
\node (n3) [SLR]    {text 8};
  • this should serve as starting point for your MWE :). Result can be something like this:

enter image description here

Edit: where I use the following MWE:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta, calc, chains, fit, quotes, shapes.symbols}

\begin{document}
    \begin{tikzpicture}[
node distance = 8mm and 6mm,
            > = Straight Barb,
         font = \sffamily,
  start chain = going below,
   box/.style = {draw, inner sep=2mm, 
              minimum height=#1,  minimum width=22mm},
 box/.default = 6mm,
    SR/.style = {box, signal, signal to=east, on chain},
   SLR/.style = {box, signal, signal to=east and west, on chain},
fitbox/.style = {rectangle, draw, inner xsep=8mm, inner ysep=4mm, xshift=-4mm},
every edge quotes/.style = {inner sep=1.5pt, font=\scriptsize\sffamily, auto}               
                        ]
\node (n1) [SR]     {text 3};
\node (n2) [SR]     {text 4};
\node (n3) [SLR]    {text 8};
%
    \begin{scope}[node distance=0mm and 8mm]
\path   let \p1 = ($(n1.north) - (n3.south)$),
            \n1 = {veclen(\y1,\x1)} in
        node (n4) [box=\n1, below right=of n1.north east] {text 9};
%
\path   let \p1 = ($(n1.north) - (n2.north)$),
            \n1 = {veclen(\y1,\x1)} in
        node (n5) [box=\n1, below right=of n4.north east] {text 10};
    \end{scope}
%
\node (n6) [fitbox, fit=(n1) (n4) (n5)] {};
%
    \begin{scope}[node distance=1mm and 22mm]
\coordinate[above=of n6.west |- n1] (n1a);
\coordinate[below=of n6.west |- n1] (n1b);
\coordinate[above=of n6.west |- n2] (n2a);
\coordinate[below=of n6.west |- n2] (n2b);
    \end{scope}
% dotted lines
\draw[very thick, densely dotted]
    (n1a) -- (n1a -| n1.west)
    (n1b) -- (n1b -| n1.west)
    (n2a) -- (n2a -| n2.west)
    (n2b) -- (n2b -| n2.west)
    (n3)  -- (n3  -| n6.west);
% inner arrows
\draw[->]   (n1) -- (n1 -| n4.west);
\draw[->]   (n2) -- (n2 -| n4.west);
\draw[<->]  (n3) -- (n3 -| n4.west);
\draw[->]   (n4.east |- n5) -- (n5);
% input arrows
\draw[->]   (n1a)+ (-2,0) to ["Text 1"  ] (n1a);
\draw[<-]   (n1b)+ (-2,0) to ["Text 2" '] (n1b);
\draw[->]   (n2a)+ (-2,0) to ["Text 5"  ] (n2a);
\draw[<-]   (n2b)+ (-2,0) to ["Text 6" '] (n2b);
%
\draw[<->]  (n3 -| n6.west) + (-2,0) to ["Text 7"] (n3 -| n6.west);
 % ouput arrows ?
\draw[<-]   ($(n2 -| n4.east)!0.5!(n3-| n4.east)$) to [pos=0.9,"Text 11"  ] + (4.4,0);
   \end{tikzpicture}
\end{document}
  • 1
    +1. To answer or not to answer, that is the question! – Andrew Jun 24 '17 at 23:24
  • @Andrew, :) :) :). As far I understand OP question, I provide answer, however not give complete code for showed image ... I will provide it when OP will show any effort what he try to do in LaTeX so far. I still wait to any his response. – Zarko Jun 25 '17 at 8:18
  • @MichaelObermeist, any news? – Zarko Jun 26 '17 at 22:04
  • Hi Zarko, my comment was not intended as a criticism. Indeed, I think that your answer is perfect! I always find it difficult when some one asks an interesting question but has put no effort into trying to answer it themselves. You shouldn't do everything for them, but you're tempted by the question. Hence my comment:) – Andrew Jun 26 '17 at 22:38
  • @Andrew, your comment give me joy :). I very liked it. – Zarko Jun 26 '17 at 22:55

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.