I was creating a mindmap for a presentation using as reference Mindmap tikzpicture in beamer (reveal step by step). My code is:
\documentclass{beamer}
\usepackage{lmodern}
\usetheme{Copenhagen}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\tikzset{
invisible/.style={opacity=0},
visible on/.style={alt=#1{}{invisible}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#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{document}
\begin{frame}{Title}
\begin{center}
\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}
};
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
which causes as error:
! Argument of \pgfkeys@code has an extra }.
<inserted text>
\par
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.
<3-4>works, too. – Qrrbrbirlbel Sep 26 '12 at 15:47:)– Claudio Fiandrino Sep 26 '12 at 15:54