« first day (116 days earlier)      last day (443 days later) » 

cfr
4:12 AM
@SašoŽivanović I'm stuck. How can I modify this code to colour all of the nodes on the same level of the tree red?
\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\begin{document}
  \begin{forest}
    [a[b[c, before typesetting nodes={for relative level=0{red}}][d]][e[f][g]]]
  \end{forest}
\end{document}
Right now, it just colours c red, but I might just as soon save the trouble and simply make that node red in that case.
I can't currently get relative level or level to do anything interesting, although I'm sure I should be able to....
[prooftrees doesn't work properly right now and this was one idea I had about how I might fix it, even though it would be rather kludgey, probably.]
I need to increase the level of all nodes at the current level which have siblings and which are not earmarked already to be moved... I can move them, I think, if I can pick them out. But I can't pick them out and I can't figure out why I'm being so stupid.
 
 
8 hours later…
12:28 PM
\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\begin{document}
  \begin{forest}
    [a[b[c,tempcounta=level,for root={for level={tempcounta}{red}}
    ][d]][e[f][g]]]
  \end{forest}
\end{document}
@cfr both level and relative level work just inside the subtree of the current node. A way to do what you want is the code I posted.
\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\begin{document}
  \begin{forest}
    [a[b[c,for root/.wrap pgfmath arg={for level={#1}{red}}{level}
    ][d]][e[f][g]]]
  \end{forest}
\end{document}
The second possibility above. (Sorry for mixed-up orde of my posts, I'm in a place with bad internet.)
 
cfr
1:19 PM
@SašoŽivanović Thanks! So how are the equals and less than versions useful? Won't the former only refer to the current node and the latter never refer to anything? And the greater than version will refer to all the current nodes descendants?
 
 
1 hour later…
cfr
2:21 PM
@SašoŽivanović That helps. I'm still stuck, but at least I'm stuck on something different.
 
 
5 hours later…
7:46 PM
Well, for relative level=0 you're certainly right, it will just refer to the current node. (And less than or equal to version as well.) But e.g. relative level=2 is certainly useful as it refers to all the grandchildren.
 

« first day (116 days earlier)      last day (443 days later) »