2

I want to add a new node g to the right side of node c, see Fig. 2.
My code below place this node on the left side of central branch, see Fig. 1. How to move it on the desired position, i.e. to the right side of the node c?

\documentclass{article}
\usepackage[showframe, 
            margin=25mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc, chains, positioning}
\usepackage{lipsum}

% https://tex.stackexchange.com/a/371591/13173
\begin{document}
    \begin{figure}
        \centering
    \begin{tikzpicture}[
    node distance = 4mm and 0.1\textwidth,
      start chain = going below,
every node/.style = {draw, fill=gray!30,
              minimum width=0.5\textwidth,
              text width =\pgfkeysvalueof{/pgf/minimum width}-2*\pgfkeysvalueof{/pgf/inner xsep},
              on chain},
                        ]
\node (a) {\lipsum*[11]};
\node (b) {\lipsum*[11]};
\node (c) {\lipsum*[11]};
\node (d) {\lipsum*[11]};
%
\coordinate[left=of $(a.west)!0.5!(d.west)$] (e);
\node (f) [minimum width=0.3\textwidth, left=of e] {\lipsum*[11]};
\draw   (a) -| (e)
        (b) -| (e)
        (c) -| (e)
        (d) -| (e);
\draw [->] (e) -- (f);

%% TODO my additions
\node (g) {\lipsum*[11]};

\coordinate[left=of $(c.east)$] (h);
\draw   (g) -| (c); 
\draw [->] (h) -- (c); % to middle of the single node 

\end{tikzpicture}
    \end{figure}
\end{document

Figures: left Fig. 1, right Fig. 2.

enter image description here enter image description here

3

Like this?

enter image description here

\documentclass{article}
\usepackage[showframe,
            margin=25mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc, chains, positioning}
\usepackage{lipsum}


\begin{document}
    \begin{figure}
        \centering
    \begin{tikzpicture}[
    node distance = 4mm and 0.0265\textwidth,
      start chain = going below,
every node/.style = {draw, fill=gray!30,
              minimum width=0.305\textwidth,
              text width =\pgfkeysvalueof{/pgf/minimum width}-2*\pgfkeysvalueof{/pgf/inner xsep},
              font=\small\sffamily,  % just for this MWE, otherwise delete this line
              on chain},
                        ]
\node (a) {\lipsum*[11]};
\node (b) {\lipsum*[11]};
\node (c) {\lipsum*[11]};
\node (d) {\lipsum*[11]};
%
\coordinate[left=of $(a.west)!0.5!(d.west)$] (e);
\node (f) [left=of e] {\lipsum*[11]};
%
\node (g) [right=of c] {\lipsum*[11]};

\draw   (a) -| (e)
        (b) -| (e)
        (c) -| (e)
        (d) -| (e);
\draw [->] (e) edge (f) (c) -- (g);
\end{tikzpicture}
    \end{figure}
\end{document}
  • Correct! Great! Hmm, simple (g) [right=of c]. Good! This step new to me \draw [->] (e) edge (f) (c) -- (g);. So you combined two [->] declarations into one. Right? – Léo Léopold Hertz 준영 Jun 5 '17 at 17:58
  • 1
    @LéoLéopoldHertz준영, yes. I like to encourage you to start with reading of TikT & PGF manual. yes, it is huge, but for start is sufficient to read the first tutorial and third part III (TikZ ist kein Zeichenprogramm). – Zarko Jun 5 '17 at 18:08

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.