1

Here's my code which is working on the landscape mode:

\begin{tikzpicture}

\node[rectangle, draw, thick,minimum width=5cm,minimum height=2.20cm] at (0,1){

\begin{tikzpicture}

\node[input]    (Method1)     at (0,1) {Method1};
\end{tikzpicture}
        };

\node[rectangle, draw, thick,minimum width=5cm,minimum height=2.20cm] at (8,1){
\begin{tikzpicture}
\node[input]    (Procedure1)     at (6,1) {Procedure1};
\end{tikzpicture}
%\draw [->] (0,-1) -- (8,-1);
        }; 
\node[rectangle, draw, thick,minimum width=5cm,minimum height=2.20cm] at (0,6){
\begin{tikzpicture}
\node[input]    (Procedure2)     at (0,6) {Procedure2};
\end{tikzpicture}           
        };
\node[rectangle, draw, thick,minimum width=8cm,minimum height=2.20cm] at (10,6){
\begin{tikzpicture}
\node[input]    (Procedure3)     at (6,6) {Procedure3};
\end{tikzpicture}               
        };           
\node[rectangle, draw, thick,minimum width=5cm,minimum height=2.20cm] at (0,11){
\begin{tikzpicture}
\node[input]    (Method2)     at (0,11) {Method2};
\end{tikzpicture}
            };
\node[rectangle, draw, thick,minimum width=5cm,minimum height=2.20cm] at (6,11){
\begin{tikzpicture}
\node[input]    (ProcedureA)     at (6,11) {ProcedureA};
\end{tikzpicture}               
        };
\node[rectangle, draw, thick,minimum width=5cm,minimum height=2.20cm] at (12,11){
\begin{tikzpicture}
\node[input]    (ProcedureB)     at (12,11) {ProcedureB};
\end{tikzpicture}               
        };
\node[rectangle, draw, thick,minimum width=5cm,minimum height=2.20cm] at (18,11){
\begin{tikzpicture}
\node[input]    (ProcedureC)     at (18,11) {ProcedureC};
\end{tikzpicture}                   
        };
\node[rectangle, draw, thick,minimum width=4cm,minimum height=2.20cm] at (0,-4){
\begin{tikzpicture}
\node[input]    (Method3)     at (0,-4) {Method3};
\end{tikzpicture}
};      
\node[rectangle, draw, thick,minimum width=4cm,minimum height=2.20cm] at (10,-4){
\begin{tikzpicture}
\node[input]    (ProcedureAB)     at (10,-4) {ProcedureAB};
%\draw [->] (10,-4)
\end{tikzpicture}
        };
\node[rectangle, draw, thick,minimum width=4cm,minimum height=2.20cm] at (19.10,-4){
\begin{tikzpicture}
\node[input]  (ProcedureABC)      at (19.50,-4) {ProcedureABC}; 
\end{tikzpicture}
        };
\draw[>=latex,->] (2.65,1)--(3.90,1);
\draw[>=latex,->] (2.65,6)--(3.90,6);
\draw[>=latex,->] (2.10,-4)--(4,-4);
\draw[>=latex,->] (2.70,11)--(3.10,11);
\draw[>=latex,->] (9,11)--(9.40,11);
\draw[>=latex,->] (14.70,11)--(15.10,11);
\draw[>=latex,->] (.15,4.35)--(.15,2.70);
\draw[>=latex,->] (.15,-.60)--(.15,-2.35);
\draw[>=latex,->] (.15,9.30)--(.15,7.70);
\draw[>=latex,->] (16.10,-4)--(17,-4);               
\end{tikzpicture}
\end{figure}

However, I have many bug-some error that I could not solve.

1) Package [pgfkeys][1] Error: I do not know the key '/tikz/input' and I am going to ignore it. Perhaps you misspelled it.

2) Missing \endcsname inserted.

3) Package [TikZ][2] Error: Giving up on this path. Did you forget a semicolon?

Can you help me debugging this?

  • (1) It's not recommended to nest TikZ pictures within nodes or even within TikZ pictures. There's probably a better way to do that. – A.Ellett May 19 '15 at 20:53
  • (2) Please make this compilable by including the preamble. In particular, you have keywords passed to nodes, but they are not standard keywords. – A.Ellett May 19 '15 at 20:55
  • I have in the preamable \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} – Reem May 19 '15 at 20:58
  • There's got to be something more. For example you're passing nodes the keyword input. What's that supposed to be? – A.Ellett May 19 '15 at 20:59
  • With a null definition for the keyword input and the addition of \begin{figure}, this compiles fine for me. – A.Ellett May 19 '15 at 21:05
2

Your code can be cleaned up quite a bit and made easier to read

\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{arrows.meta}
\tikzset{input/.style={}}
\begin{document}

\begin{tikzpicture}[my node/.style={rectangle, draw, thick,minimum width=#1,minimum height=2.20cm,outer sep=4pt},
                    >=latex]

\node[my node=5cm] (M1) at (0,1){ Method1 };
\node[my node=5cm] (P1) at (8,1){ Procedure1 };
\node[my node=5cm] (P2) at (0,6){ Procedure2};
\node[my node=8cm] (P3) at (10,6){ Procedure3};
\node[my node=5cm] (M2) at (0,11){Method2};
\node[my node=5cm] (PA) at (6,11){ProcedureA};
\node[my node=5cm] (PB) at (12,11){ProcedureB};
\node[my node=5cm] (PC) at (18,11){ProcedureC};
\node[my node=4cm] (M3) at (0,-4){Method3};
\node[my node=4cm] (PAB) at (10,-4){ProcedureAB};
\node[my node=4cm] (PABC) at (19.10,-4){ProcedureABC};


\foreach \myA/\myB in {M1/P1,
                       P2/P3,
                       M3/PAB,
                       M2/PA,
                       PA/PB,
                       PB/PC,
                       M2/P2,
                       P2/M1,
                       M1/M3,
                       PAB/PABC%%
                       }
{
  \draw[->,line width=2pt,opacity=0.20] (\myA) -- (\myB);
}

\end{tikzpicture}

\end{document}

enter image description here

You could probably even use the positioning library to make this even easier.

In this next example, I using the positioning library to finesse the alignment of the different boxes. The key word on grid makes sure that the nodes are aligned on their center. To enable the text to wrap in each node, I use the keyword text width=<dimension> and set the alignment to centering via align=center.

\documentclass[border=12pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{input/.style={}}
\begin{document}

\begin{tikzpicture}[my node/.style={on grid,rectangle, draw, thick,minimum width=#1,minimum height=2.20cm,outer sep=4pt},
                    node distance=4cm and 8cm,
                    >=latex]

\node[my node=5cm] (M1)                {Qualitative};
\node[my node=5cm,right=of M1]  (P1)   {Contexts examination of concordance lines};
\node[my node=5cm,above=of M1]  (P2)   {Concordancing};
\node[my node=8cm,right=of P2,text width=7.75cm,align=center]  (P3)   {Make a conconrdance of Metaphor Keywords in the whole corpus};
\node[my node=5cm,above=of P2]  (M2)   {Qualitative};
\node[my node=5cm,right=of M2]  (PA)   {Close Reading of 10\% corpus};
\node[my node=5cm,right=of PA]  (PB)   {Metaphor Identification};
\node[my node=5cm,right=of PB]  (PC)   {Forming Metaphor Keywords};
\node[my node=4cm,below=of M1]  (M3)   {Quantitative};
\node[my node=4cm,right=of M3,text width=3.75cm,align=center]  (PAB)  {Reporting descriptive statistics (percentages, distributions, etc)};
\node[my node=4cm,right=of PAB] (PABC) {Hypothesis testing};

\foreach \myA/\myB in {M1/P1,
                       P2/P3,
                       M3/PAB,
                       M2/PA,
                       PA/PB,
                       PB/PC,
                       M2/P2,
                       P2/M1,
                       M1/M3,
                       PAB/PABC%%
                       }
{
  \draw[->,line width=1pt] (\myA) -- (\myB);
}

\end{tikzpicture}

\end{document}

enter image description here

  • Only thing is that I don't know what input is supposed to mean. So, its effect is completely missing from my solution. – A.Ellett May 19 '15 at 21:30

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.