Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need your help with a diagram, where I want to place both fork down and right to organize my concept map.
If someone have a better solution, please give me some advice.
Here´s the code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees}

\begin{document}
\begin{center}
\begin{tikzpicture}[
edge from parent fork down,
edge from parent/.style={black,thick,draw},
every node/.style={rectangle,draw,rounded corners},
every child node/.style={anchor=north},
par node/.style={
    text width=#1,
    align=left,
},
par node/.default=40mm,
parent anchor=south,
growth parent anchor=south,
]

\node[par node] (p) at (0,0) {
    \begin{center}\textbf{TITLE}\\\end{center}
    Long text long text long text long text long text long text
}[sibling distance=50mm]
child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}
    [sibling distance=27mm]
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
}
child {node [par node] {\textbf{Title}\\ Long text long text long text long text long text long text}[sibling distance=27mm]
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}}
    }
child {node [par node]{\textbf{Title}\\ Long text long text long text long text long text long text}
    [sibling distance=27mm]
    child {node[par node]{\textbf{Title}\\ Long text long text long text long text long text long text}
    }
};
\end{tikzpicture}
\end{center}
\end{document}

I want something like this:

image

share|improve this question
2  
Wouldn’t you had different level of children then? TikZ don’t provide a growth function for that kind of tree, I believe. Maybe it is better to use the positioning library and connect the nodes manually. Otherwise you would have to write your own growth function. :( –  Qrrbrbirlbel Dec 29 '12 at 14:16
    
Thanks, I'll try it. –  Isai Dec 29 '12 at 19:29
    
Have you find a solution? Do you want to self-answer with a MWE? –  Qrrbrbirlbel Jan 7 '13 at 14:35
    
@Qrrbrbirlbel I have just answered what I wrote in my code for my concept map. –  Isai Jan 9 '13 at 15:17

1 Answer 1

up vote 1 down vote accepted

This is what I used to get my concept map. But, what I don't like is the overlapped lines.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees}

\begin{document}
\begin{tikzpicture}

 \draw (5,10.5) node (efectof) [draw,fill=black!15,rounded corners,align=left,text width=70mm]{\begin{tabular}{m{67mm}} \center\textbf{text}\\ text\\ \end{tabular} };

 \draw (0,7.9) node (efectoi1) [draw,rounded corners,align=left,text width=42mm]{ \textbf{text}\\ \small{text}};
 \draw (5,7.9) node (efectoi2) [draw,rounded corners,align=left,text width=42mm]{ \textbf{text}\\ \small{text}};
 \draw (10,7.9) node (efectoi3) [draw,rounded corners,align=left,text width=42mm]{ \textbf{text}\\ \small{text}};

\draw (efectof) --++(0,-16mm)-| (efectoi1);
\draw (efectof) -- (efectoi2);
\draw (efectof) --++(0,-16mm)-| (efectoi3);

 \draw (0,5.7) node (efectod1) [draw,rounded corners,align=left,text width=42mm]{ \textbf{text}\\ \small{text}};
 \draw (5,5.7) node (efectod2) [draw,rounded corners,align=left,text width=42mm]{ \textbf{text}\\ \small{text}};
 \draw (10,5.7) node (efectod3) [draw,rounded corners,align=left,text width=42mm]{ \textbf{text}\\ \small{text}};

\draw (efectod1) -- (efectoi1);
\draw (efectod2) -- (efectoi2);
\draw (efectod3) -- (efectoi3);

 \draw (5,3) node (problema) [draw,fill=black!15,rounded corners,align=left,text width=70mm]{\begin{tabular}{m{70mm}} \center\textbf{text}\\ text\\\end{tabular} };

\draw (problema) --++(0,15mm)-| (efectod1);
\draw (problema) -- (efectod2);
\draw (problema) --++(0,15mm)-| (efectod3);

 \draw (0,0) node (causa1) [draw,rounded corners,align=left,text width=40mm]{ \textbf{text}\\ \small{text}};
 \draw (5,0) node (causa2) [draw,rounded corners,align=left,text width=40mm]{ \textbf{text}\\ \small{text}};
 \draw (10,0) node (causa3) [draw,rounded corners,align=left,text width=40mm]{ \textbf{text}\\ \small{text}};

\draw (problema) --++(0,-16mm)-| (causa1);
\draw (problema) -- (causa2);
\draw (problema) --++(0,-16mm)-| (causa3);

 \draw (0,-2.2) node (indir1) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};
 \draw (0,-4.4) node (indir2) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};
 \draw (0,-6.6) node (indir3) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};
 \draw (0,-8.8) node (indir4) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};

\draw (causa1.west)--++(-5mm,0mm)|-(indir1.west);
\draw (causa1.west)--++(-5mm,0mm)|-(indir2.west);
\draw (causa1.west)--++(-5mm,0mm)|-(indir3.west);
\draw (causa1.west)--++(-5mm,0mm)|-(indir4.west);

 \draw (5,-2.2) node (indir5) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};
 \draw (5,-4.4) node (indir6) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};
 \draw (5,-6.6) node (indir7) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};
 \draw (5,-8.8) node (indir8) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};
 \draw (5,-10.5) node (indir9) [draw,rounded corners,align=left,text width=30mm]{\textbf{text}\\ \small{text}};

\draw (causa2.west)--++(-5mm,0mm)|-(indir5.west);
\draw (causa2.west)--++(-5mm,0mm)|-(indir6.west);
\draw (causa2.west)--++(-5mm,0mm)|-(indir7.west);
\draw (causa2.west)--++(-5mm,0mm)|-(indir8.west);
\draw (causa2.west)--++(-5mm,0mm)|-(indir9.west);

 \draw (10,-2.2) node (indir10) [draw,rounded corners,align=left,text width=30mm]{\small{\textbf{text}\\ text}};

\draw (causa3.east)--++(4mm,0mm)|-(indir10.east);

\end{tikzpicture}

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.