TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was creating a mindmap for a presentation using as reference tikzpicture in beamer. My code is:



    visible on/.style={alt=#1{}{invisible}},
    alt/.code args={<#1>#2#3}{%

\tikzset{level 1 concept/.append style={font=\sf, sibling angle=90,level distance = 25mm}}
\tikzset{every node/.append style={scale=0.6,text=white}}

\begin{tikzpicture}[mindmap,text=white, concept color=blue]
\node[concept,visible on=<1->]{Root Concept}[clockwise from=315]
 child [concept color=violet,visible on=<2,3>] {node[concept] (c1){Child 1}                                
 child [concept color=orange,visible on=<3>]{node [concept](c2){Child 2}


which causes as error:

! Argument of \pgfkeys@code has an extra }.
<inserted text> 
l.38 \end{frame}

I suspect the problem arises along the line:

child [concept color=violet,visible on=<2,3>] {node[concept] (c1){Child 1}}

in particular in presence of <2,3> (simply writing <2> or <2-> the compilation is fine), but I don't see any way to fix it and even (worst) I don't understand the reasons behind this error.

share|improve this question
<3-4> works, too. – Qrrbrbirlbel Sep 26 '12 at 15:47
@Qrrbrbirlbel: yes.. also in this way it works. Thanks :) – Claudio Fiandrino Sep 26 '12 at 15:54
This is hardly a minimal example. I've been playing with it and have been able to remove several statements and still reproduce the same error. In the interest of saving other people's time, I suggest you trim this down as best as you can. – Marc van Dongen Sep 26 '12 at 15:57
A simple rule to use pgfkeys: It is permissible to surround both the key or the value in curly braces (which are removed). Especially putting the value in curly braces needs to be done quite often, namely whenever the value contains an equal-sign or a comma. – Paul Gaborit Sep 26 '12 at 17:25
up vote 9 down vote accepted


child  [concept color=violet,visible on=<{3,4}>] {node [concept](c13){Child 1-3}}

Your code runs fine.

share|improve this answer
Oh.. that's right, it works! It didn't come in my mind. Thank you very much :) – Claudio Fiandrino Sep 26 '12 at 15:53

Your Answer


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.