I want to number my lowest-level children in a tree with $\omega_i$, where $i$ are the 8 branches of the tree. In the forest
documentation I found an example using a TeX counter, but it does not seem to work, as the counter is updated only once.
I understand there should also be a solution where no counter is used, but everything is handled inside forest.
This is where I am:
\documentclass[tikz,border=5pt]{standalone}
\usepackage{forest}
\begin{document}
\tikzset{
dot/.style={circle,draw,inner sep=1.2,fill=black},
}
\newcount\xcount
\begin{forest}
for tree={
if n children=0{}{dot},
delay={TeX={\xcount=0},
if n children=0{fill=white,
TeX={\advance\xcount1},
content/.expanded={$\omega_{\the\xcount}$}}{}
},
}
[[
[[][]]
[[][]]
][
[[][]]
[[][]]
]]
\end{forest}
\end{document}