I'm trying to use visible on style defined by Qrrbrbirlbel with an automatic increment overlay <-+>. However, when I do so the nodes and the edges are incremented separately. I blame the lines
/tikz/visible on={#1},
edge={/tikz/visible on={#1}}
that apply the passed range to the edge and nodes separately. However, I don't know how to send the same auto-increment to both of them simultaneously. Another way may be to decrement the counter, but I'm not familiar with beamer overlays to know which parts to tweak.
How can I achieve such endeavor?
I took this code to show the behavior I described. I'm trying to make the tree appear a node (and its corresponding edge) at a time.
\documentclass{beamer}
\usepackage{forest}
\setbeamertemplate{navigation symbols}{} %Remove navigation bar
\tikzset{
invisible/.style={opacity=0,text opacity=0},
visible on/.style={alt=#1{}{invisible}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
},
}
\forestset{
visible on/.style={
for children={
/tikz/visible on={#1},
edge={/tikz/visible on={#1}}}}}
\begin{document}
\begin{frame}[plain]{Same with forest}
\begin{forest}
[VP, calign=last, visible on=<+->
[{[ajout]}\\\textit{rapidement},
align=center,
base=top, visible on=<+->, ]
[VP, calign=first, visible on=<3->,
[VP, calign=first, visible on=<2->,
[V\\\textit{mange}, align=center,base=top, visible on=<1->, ]
[{[compl]}\\\textit{une orange}, align=center,base=top, visible on=<1->, ]
]
[{[ajout]}\\\textit{dans la cuisine}, align=center, visible on=<2->,]
]
]
\end{forest}
\end{frame}
\end{document}
See the result using descendants (children produces the same result). Notice how the nodes appear first, and then edges start appearing.

for childrenwhich will affect multiple nodes unless no node has more than one child. Moreover, yourvisible onspecifications don't make sense since applying such specifications to terminal nodes will obviously have no effect given that the style is only applied to children. – cfr Oct 28 '15 at 22:54<2->or<3->. I was hopping for something more automatic like<+->. Nevertheless, I tried it that way, and changed theascendantsfordescendantsorchildrenbut that has the problem that reveals the tree a node at a time, and an edge at a time. – adn Oct 28 '15 at 23:13