Skip to content

Commit

Permalink
v2.0.3
Browse files Browse the repository at this point in the history
Changes:

1. Bugfixes
- Keys `delay n` and `.wrap n pgfmath args` don't introduce two layers of hash
  doubling anymore (with compat keys for the old, confusing behaviour).
- 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.
- 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`).

2. New features
- 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`.
  • Loading branch information
sasozivanovic committed Apr 9, 2016
1 parent e6971a2 commit 3c3952f
Show file tree
Hide file tree
Showing 7 changed files with 779 additions and 332 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package-derived-sty = $(shell grep -Poh '\\file{(.*?)}' $(ins) | sed 's/\\file{\
package-sty = $(package-nonderived-sty) $(package-derived-sty)

doc-tex = forest-doc.tex
doc-sty = forest-doc.sty
doc-sty = forest-doc.sty forest-index.sty
doc-other = forest-doc.ist ~/texmf/bibtex/bib/local/tex.bib
doc-pdf = forest-doc.pdf

Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LaTeX package: forest [2016/03/04 v2.0.2 Drawing (linguistic) trees]
LaTeX package: forest [2016/04/09 v2.0.3 Drawing (linguistic) trees]

Copyright (c) 2016 Saso Zivanovic
(Sa\v{s}o \v{Z}ivanovi\'{c})
Expand Down
30 changes: 25 additions & 5 deletions forest-compat.sty
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,24 @@
\forestset{@@deprecated/.code={\forest@deprecated{#1}}}
\def\forestcompat#1{\pgfqkeys{/forest/@compat}{#1}}
\forestcompat{
silent/.style={\def\forest@deprecated##1{}},
%%% begin listing region: compat_keys
most/.style={1.0-most},
all/.style={1.0-all},
none/.style={},
silent/.style={\def\forest@deprecated##1{}},
%%% begin listing region: compat_1.0
1.0-most/.style={
1.0-triangle,1.0-linear,1.0-nodewalk,1.0-ancestors,
1.0-fittotree,1.0-for,1.0-forall
},
1.0-all/.style={
1.0-most,
1.0-ignoreinvalidsteps,1.0-rotate,1.0-stages,1.0-name
1.0-forstep,1.0-rotate,1.0-stages,1.0-name,
2.0.2-all,
},
%%% end listing region: compat_1.0
2.0.2-all/.style={
2.0.2-delayn,2.0.2-wrapnpgfmathargs,
},
%%% end listing region: compat_keys
1.0-triangle/.style={
/forest/triangle/.style={
@@deprecated={key "triangle" from v1.0.x. Use key "roof" from library "linguistics" instead},
Expand Down Expand Up @@ -100,7 +104,7 @@
@@deprecated={Key "for all previous" from v1.0.x. Use key "for preceding siblings" instead.},
for preceding siblings={##1}},
},
1.0-ignoreinvalidsteps/.code={%
1.0-forstep/.code={%
\def\forest@forstepwrapper##1##2{%
\def\forest@nodewalk@config@everystep@method{independent}%
\def\forest@nodewalk@config@history@method{independent}%
Expand Down Expand Up @@ -166,5 +170,21 @@
}%
}%
},
2.0.2-delayn/.style={
/forest/delay@n/.style 2 args={
@@deprecated={propagator "delay n" (it introduces two levels of hash doubling)},
if={##1==1}{delay={##2}}{delay={delay@n/.wrap pgfmath arg={{####1}{##2}}{##1-1}}}
},
},
2.0.2-wrapnpgfmathargs/.code={
\def\forest@wrap@pgfmath@args@@@wrapandpasson{%
\forest@deprecated{handler "wrap n pgfmath args" (it introduces two levels of hash doubling)}%
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\forest@wrapped
\expandafter\expandafter\expandafter{%
\expandafter\forest@wrap@code\forest@wrap@args}%
\expandafter\pgfkeysalso\expandafter{\expandafter\pgfkeyscurrentpath\expandafter=\expandafter{\forest@wrapped}}%
}%
},
}
\expandafter\forestcompat\expandafter{\forest@compat}
539 changes: 355 additions & 184 deletions forest-doc.tex

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions forest-index.dtx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% \CheckSum{557}
% \CheckSum{561}
% \iffalse meta-comment
% forest-index.dtx
%% `forest-index' is an indexing system for the documentation of package `forest', using the package itself.
Expand Down Expand Up @@ -292,7 +292,7 @@
% \end{compactitem}
% \indexex{for step=\indexex{nodewalk}} is used because
% |create@subentry@node| walks down the created tree. At |if n=0|
% below, we're thus positioned at the lowest node.\indexex[margin]{option>nodewalk}
% below, we're thus positioned at the lowest node.\indexex[margin]{step>nodewalk}
% \begin{macrocode}
for nodewalk={
% \end{macrocode}
Expand Down Expand Up @@ -770,19 +770,21 @@
% \begin{macrocode}
\def\forestindex@filename{\jobname.foridx}
\IfFileExists{\forestindex@filename}{%
\input\forestindex@filename
\input\forestindex@filename\relax
}{}%
\newwrite\forestindex@out
\immediate\openout\forestindex@out=\forestindex@filename
\immediate\openout\forestindex@out=\forestindex@filename.tmp
\AtEndDocument{%
\immediate\closeout\forestindex@out
\forest@file@copy{\forestindex@filename.tmp}{\forestindex@filename}%
}
\endinput
% \end{macrocode}
%
%%% \iffalse
%%% Local Variables:
%%% mode: doctex
%%% TeX-master: "forest-doc.tex"
%%% TeX-master: "forest-doc"
%%% TeX-command-default: "sty"
%%% End:
%%% \fi
7 changes: 5 additions & 2 deletions forest-libs.dtx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% \CheckSum{232}
% \CheckSum{235}
% \iffalse meta-comment
% forest-libs.dtx
%% `forest-libs' is a collection of libraries for package `forest'.
Expand Down Expand Up @@ -99,7 +99,10 @@
}
% \end{macrocode}
%
%
% |c-commanders| could also be defined using \indexex{branch}:
% \begin{lstlisting}
% branch={current and ancestors, siblings}
% \end{lstlisting}
%
% \indexitem{node key>sn edges}
%
Expand Down
Loading

0 comments on commit 3c3952f

Please sign in to comment.