« first day (119 days earlier)      last day (440 days later) » 

cfr
12:08 AM
OK, I think I figured out how to change the processing order but it just isn't such a good idea after all ;).
 
 
2 hours later…
cfr
2:14 AM
@SašoŽivanović Is it possible to use a toks option of some description to store a list of options to be used to format part of a tree?
\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\begin{document}
\forestset{%
  declare autowrapped toks register={my auto toks},
  declare toks register={my toks},
  my auto toks={font=\itshape},
  my toks={font=\scshape},
%   my auto toks={blue, font=\itshape},
%   my toks={red, font=\scshape},
}
\begin{forest}
  for tree={
    style/.register=my auto toks,
  }
  [a [b][c]]
\end{forest}
\begin{forest}
  for tree={
    style/.register=my toks,
  }
  [a [b][c]]
\end{forest}
\end{document}
In the above example, neither tree will compile successfully. However, if I uncomment the two commented lines, all is well. And I've tried various other permutations: keylists, options rather than registers, \forestregister, \foresteregister, \noexpand, \csname etc. etc.
It also works if I use
  my auto toks={,font=\itshape},
  my toks={,font=\scshape},
Or I can say
      my auto toks/.wrap value={,#1},
      style/.register=my auto toks,
But this is a little weird and ... well ... I have no idea why it works.
 
cfr
3:09 AM
OK... some idea why it works. So I guess it seems reasonably OK to wrap the value before use. And that seems to work better than wrap pgfmath arg or I can make it work better, anyway. But it still seems weird this is required.
 
 
11 hours later…
2:12 PM
@cfr I will think about the splits. While it's true, as far as I know, that it's impossible to split a pgf/tikzpicture,it is certainly to possible to "split" a forest tree, in the sense that one forest environment can produce multiple tikzpictures.
@cfr I'm a bit confused about style key from your example. What is that? I guess it must be some pgf/tikz key ... can you point me to the page in manual?
 
2:33 PM
Putting aside my question above for the moment, here's the first glimpse towards the problem. As forest doesn't know key style, its key-value is appended to node options. In the my toks={font=\scshape} case, node options gets style=font=\scshape, which is an illegal keyval. In the second case of my toks={red,font=\scshape}, node options receives style=red, font=\scshape, which is at least syntactically ok if maybe not what is intended: probably style={red, font=\scshape}.
At the last thing, ommision of braces, might be considered forest's fault.
 
 
7 hours later…
cfr
9:17 PM
@SašoŽivanović What I'm actually using is now something like this
\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\begin{document}
\forestset{%
  declare autowrapped toks register={my auto toks},
  my auto toks={font=\itshape},
}
\begin{forest}
  for tree={
    my auto toks/.wrap value={,#1},
    style/.register=my auto toks,
  }
  [a [b][c]]
\end{forest}
\end{document}
I'll see if I can find a reference for style. I couldn't figure out how to apply the key-value list from the register without it. Probably, I should have something like node options...?
That works and avoids style which I can't find in the manual. I don't know if that means it isn't a key or if it means it isn't document....
Actually, I guess it must be recognised, so it can't be entirely my creation else I'd get an error.
@SašoŽivanović It is defined in tikz.code.tex:
\pgfkeys{/tikz/style/.style=#1}
I can't find it in the manual, though. At least, I can find it only for other, particular cases. But I don't want to say it isn't there somewhere....
How can one forest produce 2 tikzpictures?
 
 
2 hours later…
11:45 PM
@cfr process keylist register
Thanks for the style info!
The forest command that actually produces a tikzpicture is draw tree. Normally, it is applied only once, within draw tree stage, but this can be reprogrammed. In v2, where draw tree method and friends, this is even easier than before!
Btw, the draw tree stage is not obliged to use draw tree. For example, in a non-branching tree such as in crocket's question, you could just as well pruduce a center (or some amsmath) environment (or no environment at all!) and typeset the nodes using "normal" TeX methods. Then page breaking would work automatically.
 

« first day (119 days earlier)      last day (440 days later) »