tikz.dev / forest Manual

Forest

Past, present and future

6.1 Changelog

First of all, the list of all compat key values for backward compatibility, and their groupings. Remember, compat values that reside in styles with suffix -most are harmless: they will not disrupt the new functionality of the package. But take care when using stuff which only resides in -all styles.

most/.style={1.0-most},
all/.style={1.0-all},
none/.style={},
1.0-harmless/.style={
1.0-triangle,1.0-linear,1.0-nodewalk,1.0-ancestors,
1.0-fittotree,1.0-for,1.0-forall,
},
1.0-most/.style={1.0-harmless,2.0.2-most},
1.0-all/.style={1.0-harmless,
1.0-forstep,1.0-rotate,1.0-stages,1.0-name,
2.0.2-all,
},
2.0.2-most/.style={2.0-most},
2.0.2-all/.style={
2.0.2-delayn,2.0.2-wrapnpgfmathargs,
2.0-all,
},
2.0-edges/.style={2.0-anchors,2.0-forkededge,2.0-folder},
2.0-most/.style={2.1.1-most},
2.0-all/.style={
2.0-delayn,
2.0-edges,
2.1.1-all,
},
2.1.1-most/.style={},
2.1.1-all/.style={2.1.1-loops},
6.1.1 v2.1
v2.1.5 (2017/07/14)

Minor improvements:

v2.1.4 (2017/02/02)

Performance:

  • Reimplement some internals of the packing algorithm to avoid consuming the string pool in documents with many trees. (We’re about 10% slower now, but (depending on the document) the memory usage can drop up to five times!)

Bugfixes:

  • Fix aggregate function .count.

  • Provide a workaround for a PGF bug: for coordinate-shaped nodes, \positionnodelater provides dimensions with pt in a wrong catcode, so max y and friends did not work for such nodes.

v2.1.3 (2017/01/27)

Bugfixes:

v2.1.2 (2016/12/31)

Bugfixes:

Compiled output

A level of hash doubling was unnecessarily introduced for the ⟨keylist⟩ argument of all loops (§3.10), and the ⟨nodewalk⟩ argument of process keylist’ and process delayed. Use this key to revert to the old behaviour.

Minor improvements:

  • Implemented key also.

v2.1.1 (2016/12/18)

Minor improvements:

  • Implemented argument processor instruction p.

Bugfixes:

  • Argument processor instruction u introduced an extra layer of braces around each result item.

  • Argument processor instructions l and L did not always load the desided number of arguments.

  • Argument processor instructions & and | were taking the arguments from the start of the left side instead of its end.

v2.1 (2016/12/05)

Backward incompatible changes (with a compat key):

Compiled output

This compat key groups the three changes listed below: the final two depend on the first, so you will probably want to revert them all or none.

Compiled output

This is really a bugfix. Growth direction based anchors parent, parent first and parent last were not facing to the direction of the parent if the growth direction of the tree changed at the node.

Compiled output
Compiled output

Update the code of keys forked edge (and friends) and folder from the edges library to reflect the above bugfix.

Compiled output

Fixing yet another bug in delay n! The number of cycles was reevaluated at each cycle. Now it is computed immediately, and fixed. Use this key to revert to the old behaviour.

Performance:

  • Substantially enhance the argument processor (§3.13), including the ability to use it as a drop-in replacement for pgfmath.

  • Internally, avoid using \pgfmathparse and friends whereever possible.

  • Implement a fast set of macros to determine if a pgfmath expression is just a ⟨count⟩ or ⟨dimen⟩ expression.

  • Optimize split option and split register.

Minor improvements:

Bugfixes:

6.1.2 v2.0
v2.0.3 (2016/04/03)

Backward incompatible changes (with a compat key):

Compiled output
Compiled output

This is really a bugfix: keys delay n and .wrap \(n\) pgfmath args (for \(n\geq 2\)) were introducing two layers of hash doubling. Now this confusing behaviour is gone, but as finding the correct number of hashes is always a tough job, compat keys are provided.

Improvements:

  • Rework draw tree edge so that by default, an edge is drawn only it both its node and its node’s parent are drawn. And yes, implement if node drawn.

  • Implement circularity detection in dynamic node operations.

  • Implement debug categories and debugging of dynamic node operations.

  • Declare some further tempdim... registers.

  • Make option id accessible via \ forestoption.

Bugfixes:

  • Execute tikz code for all (including phantom) nodes. (The feature of ignoring phantom nodes was introduced in v2.0.2, but turns out it was a bad idea: for example, having a phantom root with some tikz code is not uncommon.)

  • Keys label and pin now append to option tikz, as makes sense.

  • Fix nodewalk steps filter and branch so that they can be embedded under nodewalk operations. (Uh, and recategorize them as operations themselves.)

  • Execute before packing node even when the node has no children.

  • level<={0}{...} now works as expected.

  • Re-setting the node name to the same value doesn’t yield an error anymore.

  • Don’t add the separator when adding the first element to a keylist option or register.

  • Copy externalization files in TeX (don’t rely on \write18).

  • Consistently store dimen options and registers with pts of catcode other.

  • Properly initialize readonly count options (n, n’, n children and level).

  • Fix some typos.

v2.0.2 (2016/03/04)

Backward incompatible changes:

  • The semantics of the parenthesized optional argument to forest environment and \ Forest macro has changed. The argument was introduced in v2.0.0: if present, it redefined stages style for the current environment/macro. This argument is now generalized to allow further (pre-stages) customization in future versions of the package. To temporarily redefine stages, write (stages={...}).

New functionality:

Bugfixes:

v2.0.1 (2016/02/20)

New functionality:

Bugfixes:

v2.0.0 (2016/01/30)

1

Backwards incompatible changes (without a compat key — sorry!):

  • The unintended and undocumented way to specify defaults using \forestset{.style={...}} (see question Making a certain tree style the default for forest at SE) does not work anymore. (Actually, it has never truly worked, and that’s why it has not compat key.) Use default preamble.

  • Renamed augmented assignment operator ⟨option⟩- for prepending to ⟨toks⟩ and ⟨keylist⟩ options +⟨option⟩. A new ⟨option⟩- is defined for keylist options and means “delete key from keylist.”

  • Short nodewalk steps are not simply styles anymore: use define short step to define them.

Backwards incompatible changes with a compat key:

Compiled output

Processing of given options, which is now exposed, and the new keylists default preamble and preamble is now included at the start of the default stages style. When changing stages, the instruction to process these keylists must now be given explicitely.

Compiled output

In v1.0, a spatial propagator for ⟨step⟩ could never fail. This turned out to be difficult to debug. In this version, when a propagator steps “out of the tree”, an error is raised by default. Check out on invalid to learn how to simulate the old behaviour without using this compatibility key.

Compiled output

This version of the package introduces option rotate and autoforwards it to node options. This is needed to handle the new Forest anchors (§3.17). However, in some rare cases (like the tree on the title page of this manual) it can lead to a discrepancy between the versions, as the time when the value given to rotate is processed is different. 1.0-rotate removes option rotate.

Compiled output

Documentation of v1.0 requested that node names be unique, but this was not enforced by the package, sometimes leading to errors. v2.0 enforces node name uniqueness. If this causes problems, use this compatibility key. In most cases using name’ instead of name should fix the problem without using compatibility mode.

These keys have been renamed:

Compiled output

Good news:

Bugfixes:

  • In computation of numeric tree-structure info, when called for a non-root node.

  • TikZ’s externalization internals (signature of \tikzexternal@externalizefig@systemcall@uptodatecheck) have changed: keep up to date, though only formally.

  • delay was not behaving additively.

  • name, alias and baseline didn’t work properly when setting them for a non-current node.

  • Augmented assignments for count options were leaking ‘.0pt’.

  • create didn’t work properly in some cases.

  • triangle (now roof in linguistics) didn’t use cycle in the edge path

6.1.3 v1.0
v1.0.10 (2015/07/22)
  • Bugfix: a left-over debugging \typeout command was interfering with a forest within tabular, see this question on TeX.SE.

  • A somewhat changed versioning scheme …

v1.09 (2015/07/15)
v1.08 (2015/07/10)
  • Fix externalization (compatibility with new tikz features).

v1.07 (2015/05/29)
  • Require package elocalloc for local boxes, which were previously defined by package etex.

v1.06 (2015/05/04)
  • Load etex package: since v2.1a, etoolbox doesn’t do it anymore.

v1.05 (2014/03/07)
  • Fix the node boundary code for rounded rectangle. (Patch contributed by Paul Gaborit.)

v1.04 (2013/10/17)
v1.03 (2013/01/28)
  • Bugfix: options of dynamically created nodes didn’t get processed.

  • Bugfix: the bracket parser was losing spaces before opening braces.

  • Bugfix: a family of utility macros dealing with affixing token lists was not expanding content correctly.

  • Added style math content.

  • Replace key tikz preamble with more general begin draw and end draw.

  • Add keys begin forest and end forest.

v1.02 (2013/01/20)
  • Reworked style stages: it’s easier to modify the processing flow now.

  • Individual stages must now be explicitely called in the context of some (usually root) node.

  • Added delay n and if have delayed.

  • Added (experimental) pack’.

  • Added reference to the style repository.

v1.01 (2012/11/14)
  • Compatibility with the standalone package: temporarily disable the effect of standalone’s package option tikz while typesetting nodes.

  • Require at least the [2010/08/21] (v2.0) release of package etoolbox.

  • Require version [2010/10/13] (v2.10, rcs-revision 1.76) of PGF/TikZ. Future compatibility: adjust to the change of the “not yet positioned” node name (2.10 @ \(\rightarrow\) 2.10-csv PGFINTERNAL).

  • Add this changelog.

v1.0 (2012/10/31)

First public version

1 The year of the release date in the package was wrong … 2015.