Release. Forester 2.2 [005V]
- July 17, 2023
- Jon Sterling
Feature Flexible transclusion options [0067]
- July 20, 2023
- Jon Sterling
This release replaces the old \transclude*, \transclude@ commands with a more flexible transclusion configuration mechanism using the support for fluid binding introduced in Forester 2.1. A basic transclusion with the default options is done in the same way as before:
\transclude{0005}The behavior of transclusion is, however, configurable by several globally allocated fluid bindings as depicted in the table below.
Table Transclusion options [0069]
| Fluid Binding | Default | Meaning |
|---|---|---|
\transclude/title |
(none) | To override the tree’s title during transclusion. |
\transclude/toc |
true |
Show the tree in the table of contents. |
\transclude/expanded |
true |
Whether the tree is expanded or not. |
\transclude/heading |
true |
If set to false, the tree’s contents will be inlined. |
\transclude/metadata |
false |
Show in a tree’s heading. |
\transclude/numbered |
true |
Whether the tree is displayed with a number or not, transitively on subtrees. |
It is possible to achieve undesirable results by combining these options in undesirable ways; it is up to you to use them correctly.
Example A configured transclusion [0068]
- July 20, 2023
- Jon Sterling
The following code produces an unnumbered transclusion that nonetheless appears in the table of context, with an overridden title.
\scope{
\put\transclude/title{A short title in context}
\put\transclude/numbered{false}
\transclude{0068}
}Feature Queries [0066]
- July 20, 2023
- Jon Sterling
This release adds support for generating subsections from transclusions obtained by a query the forest; this can be used to produce topical bibliographies.
Example A conjunctive query node [006A]
- July 20, 2023
- Jon Sterling
The following code will generate a subsection containing my “featured talks” as collapsed subtrees:
\scope{
\query{
\query/and{
\query/author{jonmsterling}
\query/taxon{reference}
\query/tag{featured}
}
}
}Under the hood, a query node is an “anonymous transclusion” and can therefore be configured using the same options as other transclusions.
A minor change is that the assets directly does not need to be flat anymore.
As always, existing forests can be upgraded by copying forest.xsl and style.css into their assets directory.