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.

Consider the original example of tikz's mindmap. The standard shape of both parent and children is circle. The official document states the difference of TikZ's mindmap from standard mindmaps by using perfect circles. I have some questions for basic customization:

Question 1: How to change the shape of concepts to form ellipse or rectangular?

Question 2: How to make the child flexible for long text? In standard mode, if having a long text, the circle will grow up (but without shift) to cover the whole mindmap.

share|improve this question
    
Please post separate questions for different questions, even if they belong to the same topic. –  Stefan Kottwitz Apr 21 '12 at 15:21
    
@StefanKottwitz I thought that both questions might have a single solution, as a rectangular concept child with text height can do this. In fact, the second question is meaningless without creating a non-circle concept. However, if you suggest, I will separate the questions. –  All Apr 21 '12 at 15:26
add comment

1 Answer

up vote 5 down vote accepted

You can modify the attributes used for concepts using every concept (to affect all the concepts) root concept (to affect only the root concept), and level 1 concept, level 2 concept, ... , level 4 concept (to affect concepts on a per level basis).

If you are going to change the concept shape, (to a rectangular shape, for example), then probably you will also have to change the style for the connection bar used. A little example:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{mindmap,decorations.pathmorphing}
\usepackage{lipsum}

\begin{document}

\tikzstyle{circle connection bar}=[to path={
  [every circle connection bar]
  decorate [decoration={snake}]
  { -- (\tikztotarget) \tikztonodes}
},
append after command={[fill=olive,draw=olive]}
]
\begin{tikzpicture}[mindmap,
  every concept/.style={rectangle,draw=olive,fill=olive!20,inner sep=8pt}]
\node [concept,text width=4cm] {\lipsum[2]}
child[grow=30] {node[concept] {child}}
child[grow=0 ] {node[concept] {child}}
child[grow=-30] {node[concept] {child}};
\end{tikzpicture}

\end{document}

enter image description here

share|improve this answer
add comment

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.