summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/forest
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-12-31 21:26:04 +0000
committerKarl Berry <karl@freefriends.org>2016-12-31 21:26:04 +0000
commitef3722646aa7f034d07d94074504a5c474692d32 (patch)
tree1f2b1bcb8c0fd2646c1b3fdbbcee1591ed771c29 /Master/texmf-dist/tex/latex/forest
parenta90d8e411303ef9aa441255464ae02f965db24e2 (diff)
forest (31dec16)
git-svn-id: svn://tug.org/texlive/trunk@42820 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/forest')
-rw-r--r--Master/texmf-dist/tex/latex/forest/forest-compat.sty48
-rw-r--r--Master/texmf-dist/tex/latex/forest/forest.sty60
2 files changed, 62 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/forest/forest-compat.sty b/Master/texmf-dist/tex/latex/forest/forest-compat.sty
index 4414eb8bc2c..03b5c39b27d 100644
--- a/Master/texmf-dist/tex/latex/forest/forest-compat.sty
+++ b/Master/texmf-dist/tex/latex/forest/forest-compat.sty
@@ -30,36 +30,39 @@
}
\forestset{@@deprecated/.code={\forest@deprecated{#1}}}
\def\forestcompat#1{\pgfqkeys{/forest/@compat}{#1}}
+\def\forestcompat@patchfailed{%
+ \pgfkeys@split@path
+ \PackageError{forest}{Patching in compat=\pgfkeyscurrentname\space failed}{}%
+}
\forestcompat{
silent/.code={\def\forest@deprecated##1{}},
%%% begin listing region: compat_keys
most/.style={1.0-most},
all/.style={1.0-all},
none/.style={},
- 1.0-most/.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,
- 2.0.2-most,
},
- 1.0-all/.style={
- 1.0-most,
+ 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-most/.style={2.0-most},
2.0.2-all/.style={
2.0.2-delayn,2.0.2-wrapnpgfmathargs,
2.0-all,
},
- 2.0-most/.style={},
+ 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-most,
2.0-delayn,
2.0-edges,
+ 2.1.1-all,
},
- 2.0-edges/.style={2.0-anchors,2.0-forkededge,2.0-folder},
+ 2.1.1-most/.style={},
+ 2.1.1-all/.style={2.1.1-loops},
%%% end listing region: compat_keys
1.0-triangle/.style={
/forest/triangle/.style={
@@ -239,13 +242,30 @@
},
2.0-folder/.code={%
\forest@iflibraryloaded{edges}{%
- \expandafter\patchcmd\csname @pgfk@/forest/folder/.@cmd\endcsname
- {parent anchor=-children last}{parent anchor=parent last}{}{}%
- \expandafter\patchcmd\csname @pgfk@/forest/folder/.@cmd\endcsname
- {edge={rotate/.option=!parent.grow},}{edge={rotate/.pgfmath=grow()}}{}{}%
+ \expandafter\patchcmd\csname pgfk@/forest/folder/.@cmd\endcsname
+ {parent anchor=-children last}
+ {parent anchor=parent last}
+ {}{\forestcompat@patchfailed}%
+ \expandafter\patchcmd\csname pgfk@/forest/folder/.@cmd\endcsname
+ {edge={rotate/.option=!parent.grow},}
+ {edge={rotate/.pgfmath=grow()}}
+ {}{\forestcompat@patchfailed}%
}{%
\appto\forest@compat@libraries@edges{\forestcompat{2.0-folder}}%
}%
},
+ 2.1.1-loops/.code={%
+ \patchcmd\newsafeRKloop % pre-{##1}
+ {\forest@temp@toks}%
+ {%
+ \forest@deprecated{hash-doubling loops from pre-2.1.2}%
+ \def\forest@temp
+ }%
+ {}{\forestcompat@patchfailed}%
+ \patchcmd\newsafeRKloop % post-{##1}
+ {\csedef}%
+ {\forest@temp@toks\expandafter{\forest@temp}\csedef}%
+ {}{\forestcompat@patchfailed}%
+ },
}
\expandafter\forestcompat\expandafter{\forest@compat}
diff --git a/Master/texmf-dist/tex/latex/forest/forest.sty b/Master/texmf-dist/tex/latex/forest/forest.sty
index 7443fbdf7ae..39ab9a6a43c 100644
--- a/Master/texmf-dist/tex/latex/forest/forest.sty
+++ b/Master/texmf-dist/tex/latex/forest/forest.sty
@@ -44,7 +44,7 @@
%% - LICENCE
%% To use the package, only the files marked with + need to be installed.
%%
-\ProvidesPackage{forest}[2016/12/18 v2.1.1 Drawing (linguistic) trees]
+\ProvidesPackage{forest}[2016/12/31 v2.1.2 Drawing (linguistic) trees]
\RequirePackage{tikz}[2013/12/13]
\usetikzlibrary{shapes}
@@ -238,18 +238,18 @@
}%
\def\newsafeloop#1{%
\csdef{safeloop@#1}##1\saferepeat{%
- \edef\safeloop@marshal{%
- \noexpand\csdef{safeiterate@#1}{%
- \unexpanded{##1}\relax
- \noexpand\expandafter
- \expandonce{\csname safeiterate@#1\endcsname}%
- \noexpand\fi
- }%
- }\safeloop@marshal
+ \forest@temp@toks{##1}%
+ \csedef{safeiterate@#1}{%
+ \the\forest@temp@toks\relax
+ \noexpand\expandafter
+ \expandonce{\csname safeiterate@#1\endcsname}%
+ \noexpand\fi
+ }%
\csuse{safeiterate@#1}%
\advance\noexpand\safeloop@depth-1\relax
\cslet{safeiterate@#1}\relax
}%
+ \expandafter\newif\csname ifsafebreak@\the\safeloop@depth\endcsname
}%
\newcount\safeloop@depth
\def\safeloop{%
@@ -263,14 +263,13 @@
\def\safeloopn{\csuse{safeloopn@\the\safeloop@depth}}%
\def\newsafeRKloop#1{%
\csdef{safeRKloop@#1}##1\safeRKrepeat{%
- \edef\safeRKloop@marshal{%
- \noexpand\csdef{safeRKiterate@#1}{%
- \unexpanded{##1}\relax
- \noexpand\expandafter
- \expandonce{\csname safeRKiterate@#1\endcsname}%
- \noexpand\fi
- }%
- }\safeRKloop@marshal
+ \forest@temp@toks{##1}%
+ \csedef{safeRKiterate@#1}{%
+ \the\forest@temp@toks\relax
+ \noexpand\expandafter
+ \expandonce{\csname safeRKiterate@#1\endcsname}%
+ \noexpand\fi
+ }%
\csuse{safeRKiterate@#1}%
\advance\noexpand\safeRKloop@depth-1\relax
\cslet{safeRKiterate@#1}\relax
@@ -3308,15 +3307,16 @@
\expandafter\forest@processor@r@\expandafter{\forest@temp}%
}
\def\forest@processor@r@#1{%
- \forest@temp@toks{}%
+ \forest@process@left@esetappend{}%
\def\forest@tempcomma{}%
\pgfqkeys{/forest}{split={#1}{,}{process@rk}}%
- \forest@process@left@esetappend{\the\forest@temp@toks}%
\let\forestmathresulttype\forestmathtype@generic
}
\forestset{%
process@rk/.code={%
- \epretotoks\forest@temp@toks{#1\forest@tempcomma}%
+ \forest@process@left@toppop\forest@temp
+ \forest@temp@toks{#1}%
+ \forest@process@left@esetappend{\the\forest@temp@toks\forest@tempcomma\expandonce{\forest@temp}}%
\def\forest@tempcomma{,}%
}%
}
@@ -3775,6 +3775,7 @@
TeX'/.code={\appto\forest@externalize@loadimages{#1}#1},
TeX''/.code={\appto\forest@externalize@loadimages{#1}},
options/.code={\forestset{#1}},
+ also/.code={\pgfkeysalso{#1}},
typeout/.style={TeX={\typeout{#1}}},
declare toks={name}{},
name/.code={% override the default setter
@@ -4982,10 +4983,8 @@
save and restore register={branched@nodewalk}{
branch@temp@toks={},
split/.process={r}{#1}{,}{#2},
- branch@temp@style/.style/.register=branch@temp@toks,
- branch@temp@style,
- branch@temp@style/.style/.register=branched@nodewalk,
- branch@temp@style,
+ also/.register=branch@temp@toks,
+ also/.register=branched@nodewalk,
}
},
nodewalk/branch@build@realstep/.style={% #1 = nodewalk for this branch
@@ -5448,14 +5447,11 @@
\pgfqkeys{/forest/nodewalk}{
.unknown/.code={%
\forest@nodewalk@areshortstepsfalse
- \pgfkeysifdefined{/forest/\pgfkeyscurrentname/@.cmd}{%
- }{%
- \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text % no value, so possibly short steps
- \forest@nodewalk@shortsteps@resolution{}%
- \forest@nodewalk@areshortstepstrue
- \expandafter\forest@nodewalk@shortsteps\pgfkeyscurrentname==========,% "=" and "," cannot be short steps, so they are good as delimiters
- \fi
- }%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text % no value, so possibly short steps
+ \forest@nodewalk@shortsteps@resolution{}%
+ \forest@nodewalk@areshortstepstrue
+ \expandafter\forest@nodewalk@shortsteps\pgfkeyscurrentname==========,% "=" and "," cannot be short steps, so they are good as delimiters
+ \fi
\ifforest@nodewalk@areshortsteps
\@escapeif{\expandafter\pgfkeysalso\expandafter{\the\forest@nodewalk@shortsteps@resolution}}%
\else