12:08 AM
2 hours later…
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}
3:09 AM
11 hours later…
2:12 PM
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}
.
7 hours later…
9:17 PM
\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....
2 hours later…
11:45 PM
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) ← previous day next day → last day (440 days later) »