3

I want to make the diagram along with the labels (citation) that looks like:

enter image description here

My working is as follows:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{arrows,matrix,positioning,shapes,arrows}
\usetikzlibrary{shapes.geometric, arrows, calc, intersections}
\newcommand{\tikznode}[2]{\relax
    \ifmmode%
    \tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {$#2$};
    \else
    \tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {#2};%
    \fi}

\begin{document}    
    \begin{figure}[!h]
        \centering
        \begin{tikzpicture}
        [
        squarednode/.style={%
            rectangle,
            draw=black!60,
            fill=white,
            very thick,
            minimum size=5mm,
            text centered,
            text width=3cm,
        }
        ]
        %Nodes
        \node[squarednode]      (maintopic)                              {Graph};
        \node[squarednode]      (uppersquare)       [above=of maintopic] {$FTTM$};
        \node[squarednode]      (rightsquare)       [right=2.5cm of maintopic] {Pascal Triangle};
        \node[squarednode]      (lowersquare)       [above=of rightsquare] {Fibonacci};

        %Lines
        \draw[<->] (uppersquare.south) -- node[anchor=east] {} (maintopic.north);
        \draw[<->] (maintopic.east) -- node[anchor=south] {} (rightsquare.west);
        \draw[<->] (rightsquare.north) -- node[anchor=west] {} (lowersquare.south);
        \draw[<->] (uppersquare.east) -- (lowersquare.west);
        \end{tikzpicture}
        \caption{Three mathematical concepts which are linked to $FTTM$.}
        \label{figure:link}
    \end{figure}
\end{document}

which produces:

enter image description here

Please help.

4
  • 1
    You can add \draw[<->] (uppersquare.south east) -- (rightsquare.north west); \draw[dashed,<->] (lowersquare.south west) -- (maintopic.north east); for the diagonal arrows.
    – leandriis
    Commented Mar 8, 2020 at 10:09
  • 1
    In the diagram you show in your question, there is no connecting arrow between "Graph" and "Pascal Triangle". Could you switch the position of "Fibonacci" and "Pascal Triangle" to get rid of crossing arrows?
    – leandriis
    Commented Mar 8, 2020 at 10:13
  • 1
    Where do you normally get your citations from (I I don't see any reference to bibtex or friends)?
    – albert
    Commented Mar 8, 2020 at 10:44
  • I modified your title to something, that has an actual meaning :). Please keep in mind, that the title should help others in the future to find related questions. "Help with diagram" is not helpful in this respect. Commented Mar 8, 2020 at 11:31

2 Answers 2

7

I try to reproduce showed image (but after seeing solution of accepted answer, I become unsure, what you like to have):

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                positioning,
                quotes
                }

\begin{document}
    \begin{figure}[!h]
    \centering
        \begin{tikzpicture}[auto,
                       > = Stealth, 
           node distance = 22mm and 44mm,
              box/.style = {draw=gray, very thick,
                            minimum height=11mm, text width=22mm, 
                            align=center},
       every edge/.style = {draw, <->, very thick},
every edge quotes/.style = {font=\footnotesize, align=center, inner sep=1pt}
                            ]
% from bottom to top
    \node (n11) [box]               {Graph};
    \node (n12) [box, right=of n11] {Pascal Triangle};
    \node (n21) [box, above=of n11] {FTTM};
    \node (n22) [box, above=of n12] {Fibonacci};
%Lines
\draw   (n11) edge ["Sayed and\\ Ahman (2103)"]     (n21)
        (n21) edge ["Ahmed et all. (2015)"]         (n22)
        (n22) edge ["Falcon and\\ Plaza (2013)"]    (n12)
        (n12) edge [pos=0.8, "Jamain\\ et all. (2010)" ']  (n21)
        (n11) edge [pos=0.2, dashed,
                    "Burns et all.\\ (2013)" ']             (n22);
\path[draw=red, thick, <->]
    (n11.south) -- ++ (0,-9mm) to ["Bolat and Kose\\ (2010)"] 
    ([yshift=-9mm] n12.south) -| ([xshift=9mm] n22.east) -- (n22);
        \end{tikzpicture}
    \caption{Three mathematical concepts which are linked to $FTTM$.}
    \label{figure:link}
    \end{figure}
\end{document}

In MWE I consider only to image relevant TikZ libraries. For edge label are used edge quotes provided by quotes library.

enter image description here

Edit: In the case, that you like to have border around label "Burns et all.\\ (2013)" than replace code line

        (n11) edge [pos=0.2, dashed, 
                    "Burns et all.\\ (2013)" ']             (n22);

with

        (n11) edge [pos=0.2, dashed, 
                    every edge quotes/.append style={solid, draw=teal, thin},
                    "Burns et all.\\ (2013)" ']             (n22);

enter image description here

3

Here is my suggestion in which I switched the positions of "Pascal Triangle" and "Fibonacci" in order to avoid crossing lines:

enter image description here

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{arrows,positioning}

\begin{document}    
    \begin{figure}[!h]
        \centering
        \begin{tikzpicture}
        [
        squarednode/.style={%
            rectangle,
            draw=black!60,
            fill=white,
            very thick,
            minimum size=5mm,
            text centered,
            text width=3cm,
            node distance=2.5cm
        }
        ]
        %Nodes
        \node[squarednode]      (graph)                             {Graph};
        \node[squarednode]      (fttm)       [above=of graph]       {FTTM};
        \node[squarednode]      (fibonacci)  [right= of graph] {Fibonacci};
        \node[squarednode]      (pascal)     [above=of fibonacci]   {Pascal Triangle};

        %Lines
        \draw[<->] (fttm.east) -- node [above,midway] {Jamaian} (pascal.west);
        \draw[<->] (fttm.south) -- node [left,midway] {Sayed}(graph.north);
        \draw[<->] (fibonacci.north) -- node [right,midway] {Falcon}(pascal.south);
        \draw[<->] (fttm.south east) -- node [right,midway] {Ahmad}(fibonacci.north west);
        \draw[dashed,<->] (graph.east) -- node [above,midway] {Burns} (fibonacci.west);
        \draw[red,<->] (graph.south east) -- node [below,midway] {Bolat} (fibonacci.south west);
        \end{tikzpicture}
        \caption{Three mathematical concepts which are linked to $FTTM$.}
        \label{figure:link}
    \end{figure}
\end{document}
3
  • 1
    OP wrote "I want to make the diagram along with the labels (citation) that looks like:", but I don't see any reference to citations in the answer.
    – albert
    Commented Mar 8, 2020 at 10:43
  • 2
    As you also noted, OP did not include any information on how citations should be generated. I therefor used some placeholder text instead. Using \cite commands inside of nodes is however definitely possible.
    – leandriis
    Commented Mar 8, 2020 at 10:48
  • Maybe best to place this remark in your answer, so others will see it as well (answers are most of the time better read than comments.
    – albert
    Commented Mar 8, 2020 at 11:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .