Diagram with tikz

by Carlos Jiménez   Last Updated April 16, 2019 04:23 AM

Hi¡ I'm workin with a diagram and I don't know how to do. I almost finished it but the last part is so difficult. Can you help me? I want to my diagram looks like

I want to my diagram looks like

And the code that I have is the next

\begin{tikzpicture}[edge from parent/.style={draw,-latex}]
\node {Lindelöf} [sibling distance=6cm]
child {node {Casi Lindelöf}
child {node {Débilmente Lindelöf} [sibling distance=1.5cm]
}
}
;
\end{tikzpicture}

From that I obtain the diagram of the image without the blue part. How can I conclude it? I really appreciate any help you can provide me.



Answers 2


One way is to add a node relative to the tree.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{trees,positioning}
\begin{document}
\begin{tikzpicture}[edge from parent/.style={draw,-latex}]
\node (Lin) {Lindel\"of} [sibling distance=6cm]
child {node {Casi Lindel\"of}
child {node {D\'ebilmente Lindel\"of} [sibling distance=1.5cm]
}
}
;
\node[left=of Lin-1-1] (text) {text};
\draw[-latex] (Lin) -- (text);
\draw[-latex] (text) -- (Lin-1-1);
\end{tikzpicture}
\end{document}

enter image description here

Or with \draw[-latex] (Lin.south west) -- (text);

enter image description here

I would also like to draw your attention to the forest package.

\documentclass{article}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={edge={-latex},calign=last,l+=5mm,s+=5mm}
 [Lindel\"of 
    [text,tier=murmel,alias=l]
    [Casi Lindel\"of
       [D\'ebilmente Lindel\"of,tier=murmel,alias=b]
    ]
 ]
\draw[-latex] (l) -- (b);
\end{forest}
\end{document}

enter image description here

marmot
marmot
April 16, 2019 03:33 AM

Pure TikZ solution

\documentclass[tikz]{standalone}
\usepackage[utf8]{inputenc}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node (lind) {Lindelöf};
\node[below=of lind] (casi) {Casi Lindelöf};
\node[below=of casi] (debi) {Débilmente Lindelöf};
\node[left=of debi] (text) {Text};
\draw[-latex] (lind) edge (casi) edge (text);
\draw[latex-] (debi) edge (casi) edge (text);
\end{tikzpicture}
\end{document}

enter image description here

Not knowing if it is good, but TikZ-cd may be an option: I prefer its syntax

\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage{tikz-cd}
\usepackage{amsmath}
\begin{document}
\begin{tikzcd}
& \text{Lindelöf}\arrow[ldd]\arrow[d]\\
& \text{Casi Lindelöf}\arrow[d]\\
\text{Text}\arrow[r] & \text{Débilmente Lindelöf}
\end{tikzcd}
\end{document}

enter image description here

matrix solution

\documentclass[tikz]{standalone}
\usepackage[utf8]{inputenc}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix[matrix of nodes,row sep=1cm,column sep=1cm] (x) {%
& Lindelöf\\
& Casi Lindelöf\\
Text & Débilmente Lindelöf\\};
\draw[-latex] (x-1-2) edge (x-2-2) edge (x-3-1);
\draw[latex-] (x-3-2) edge (x-3-1) edge (x-2-2);
\end{tikzpicture}
\end{document}

enter image description here

JouleV
JouleV
April 16, 2019 03:34 AM

Related Questions


Updated April 19, 2018 17:23 PM

Updated September 19, 2018 22:23 PM

Updated February 01, 2017 14:09 PM

Updated April 05, 2018 02:23 AM

Updated August 20, 2017 21:23 PM