2

I have very simple tikzpicture table-scheme and I need to move arrow to the right.. Now it is looks like this: enter image description here

But I want to make it like this: enter image description here

My code:

 ... \\ \\ & \node [block_center] (des1) {X[0] OP Y[0]}; & \node [block_center] (des2) {X[1] OP Y[1]}; & \node [block_center] (des3) {X[2] OP Y[2]}; & \node [block_center] (des4) {X[3] OP Y[3]}; \\ }; \begin{scope}[every path/.style=line] \path (x1) -- (op1); \path (x2) -- (op2); \path (x3) -- (op3); \path (x4) -- (op4); \path (y1) -- (op1); \path (y2) -- (op2); \path (y3) -- (op3); \path (y4) -- (op4); ... 
2
  • 2
    Welcome to TeX.SE! Please extend your code fragment to complete but small document with your picture, which we can compile as it is! Commented Nov 8, 2020 at 13:21
  • @Zarko OH MY GOD SORRY i didn't think about it!!! Commented Nov 8, 2020 at 14:37

1 Answer 1

2

Ok, since you are new here ...

and for exercise and fun:

\documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{arrows.meta, chains, positioning} \begin{document} \begin{tikzpicture}[ node distance = 5mm and 3mm, start chain = going right, box/.style = {draw, thick, text width=8em, minimum height=3ex, align=#1}, box/.default = center ] \foreach \i in {0,1,...,3} { \node (n1\i) [box, on chain] {X[\i]}; \node (n2\i) [box=right, below=of n1\i] {Y[\i]}; \node (n3\i) [box, below=of n2\i] {OPERATION}; \draw[-Stealth] (n1\i) -- (n3\i); \draw[-Stealth] ([xshift=2em] n2\i.south) coordinate (aux) -- (aux |- n3\i.north); \node (n4\i) [box, below=of n3\i] {X[\i] OP Y[\i]}; \draw[-Stealth] (n3\i) -- (n4\i); } \end{tikzpicture} \end{document} 

enter image description here

Addendum: For exercise here is small variation of original answer, result is slightly more fancy ...

\documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{arrows.meta, chains, positioning} \begin{document} \begin{tikzpicture}[ node distance = 5mm and 3mm, start chain = going right, box/.style = {draw, thick, outer sep=0pt, text width=6em, minimum height=3ex, align=#1}, box/.default = center ] \foreach \i in {0,1,...,3} { \node (n1\i) [box, on chain] {X[\i]}; \node (n2\i) [box=right, below=of n1\i] {Y[\i]}; \node (n3\i) [box, below=of n2\i] {OPERATION}; \draw[-Stealth] (n1\i) -- (n3\i); \draw[white, thick, densely dashed] (n2\i.north) -- (n2\i.south); \draw[-Stealth, transform canvas={xshift=2em}] (n2\i) -- (n3\i); \node (n4\i) [box, below=of n3\i] {X[\i] OP Y[\i]}; \draw[-Stealth] (n3\i) -- (n4\i); } \end{tikzpicture} \end{document} 

enter image description here

2
  • Many thanks to you! From now on I will be more attentive to my requests on this stack-exchange Commented Nov 8, 2020 at 14:38
  • @chiuki, you are welcome. For exercise I add small variation of original answer. Maybe you'll like it :-) Commented Nov 8, 2020 at 14:48

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.