0

Assume I have a tree of the following form:

\node (r) {Root}
  child { node (c1) {Left Child} }
  child { node (c2) {Right Child} }
  ;

Now, I want to put this into a beamer frame and apply \only and \uncover to individual \node; elements. But if I have one huge tree, I cannot do that. So is there a way to decouple the child nodes, and refer to the parent node by name?

bitmask
  • 1,205

1 Answers1

1

The solution is quite simple, one can leave empty childs and then reference them in a separate node:

\node (r) {Root}
  child 
  child 
  ;
\node (c1) at (r-1) {Left Child};
\node (c2) at (r-2) {Right Child};

The syntax is basically appending -1, -2, etc to the parent node's identifier.

Child nodes can also be named:

\node (r) {Root}
  child {coordinate (left)}
  child {coordinate {right)}
  ;
\node (c1) at (left) {Left Child};
\node (c2) at (right) {Right Child};
bitmask
  • 1,205