texlive[42820] Master/texmf-dist: forest (31dec16)

commits+karl at tug.org commits+karl at tug.org
Sat Dec 31 22:26:05 CET 2016


Revision: 42820
          http://tug.org/svn/texlive?view=revision&revision=42820
Author:   karl
Date:     2016-12-31 22:26:04 +0100 (Sat, 31 Dec 2016)
Log Message:
-----------
forest (31dec16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/forest/README
    trunk/Master/texmf-dist/doc/latex/forest/forest-doc.pdf
    trunk/Master/texmf-dist/doc/latex/forest/forest-doc.tex
    trunk/Master/texmf-dist/doc/latex/forest/forest.pdf
    trunk/Master/texmf-dist/source/latex/forest/forest.dtx
    trunk/Master/texmf-dist/tex/latex/forest/forest-compat.sty
    trunk/Master/texmf-dist/tex/latex/forest/forest.sty

Modified: trunk/Master/texmf-dist/doc/latex/forest/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/forest/README	2016-12-31 21:25:46 UTC (rev 42819)
+++ trunk/Master/texmf-dist/doc/latex/forest/README	2016-12-31 21:26:04 UTC (rev 42820)
@@ -1,4 +1,4 @@
-LaTeX package: forest [2016/12/18 v2.1.1 Drawing (linguistic) trees]
+LaTeX package: forest [2016/12/31 v2.1.2 Drawing (linguistic) trees]
 
 Copyright (c) 2016 Saso Zivanovic
                    (Sa\v{s}o \v{Z}ivanovi\'{c})
@@ -14,7 +14,7 @@
 encoding of trees plus the key--value interface to option-setting;
 - many tree-formatting options, with control over option values of
 individual nodes and mechanisms for their manipulation;
-- a powerful mechanism for travesing the tree;
+- a powerful mechanism for traversing the tree;
 - the possibility to decorate the tree using the full power of pgf/tikz;
 - an externalization mechanism sensitive to code-changes.
 

Modified: trunk/Master/texmf-dist/doc/latex/forest/forest-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/forest/forest-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/forest/forest-doc.tex	2016-12-31 21:25:46 UTC (rev 42819)
+++ trunk/Master/texmf-dist/doc/latex/forest/forest-doc.tex	2016-12-31 21:26:04 UTC (rev 42820)
@@ -402,7 +402,7 @@
   key--value interface to option-setting;
 \item many tree-formatting options, with control over option values of individual nodes and
   mechanisms for their manipulation;
-\item a powerful mechanism for travesing the tree;
+\item a powerful mechanism for traversing the tree;
 \item the possibility to decorate the tree using the full power of \PGF;/\TikZ;;
 \item an externalization mechanism sensitive to code-changes.
 \end{enumerate*}
@@ -2685,6 +2685,14 @@
   interpreted as (cumulative) \TikZ; code.  If you'd like to use afterthoughts for some other
   purpose, redefine this style --- this will take effect even if you do it in the tree preamble.
 
+\indexitem{node key>also}|=|\meta{keylist} Execute the keys in the given \meta{keylist}.
+
+If we are currently processing node keys, \meta{keylist} should contain node keys.  If we are
+in a nodewalk, \meta{keylist} should (or rather, may also) contain nodewalk keys.
+
+For example, to execute, during a nodewalk, a nodewalk keylist stored in register |tempkeylista|,
+write |also/.register=|\indexex{tempkeylista}. Note that no embedded nodewalk will be introduced.
+  
 \indexitem{node key>autoforward}|=|\meta{option}\meta{keylist}, \indexdef{node key>autoforward register}|=|\meta{register}\meta{keylist}
 \itemnosep
 \indexitem{node key>autoforward'}|=|\meta{option}\meta{keylist}, \indexdef{node key>autoforward register'}|=|\meta{register}\meta{keylist}
@@ -3804,8 +3812,8 @@
   aligned to the anchor of the current node.
 
   Behind the scenes, this style sets the alias of the current node to \keyname{forest at baseline@node}.
+  {\tikzexternaldisable
 \begin{forestexample}[index={baseline,use as bounding box'}]
-  {\tikzexternaldisable
   Baseline at the
   \begin{forest}
     [parent,~baseline~,use as bounding box'
@@ -3815,8 +3823,8 @@
   \begin{forest}
     [parent
       [child,~baseline~,use as bounding box']]
-  \end{forest}.}
-\end{forestexample}
+  \end{forest}.
+\end{forestexample}}
 
 \indexitem>{tikz key>fit to}|=|\meta{nodewalk} Fits the \TikZ; node to the nodes in the given
   \meta{nodewalk}.
@@ -5370,9 +5378,12 @@
     },
     draw tree stage/.style={
       for root'={
-        draw tree processing order/.nodewalk style={branch={{from to={1}{round(n_children()/3)}},tree}}, draw tree, TeX={~~},
-        draw tree processing order/.nodewalk style={branch={{from to={1+round(n_children()/3)}{2*round(n_children()/3)}},tree}}, draw tree, TeX={~~},
-        draw tree processing order/.nodewalk style={branch={{from to={1+2*round(n_children()/3)}{n_children()}},tree}}, draw tree,
+        if n children=0{% so that we don't get an error on the first run
+        }{
+          draw tree processing order/.nodewalk style={branch={{from to={1}{round(n_children()/3)}},tree}}, draw tree, TeX={~~},
+          draw tree processing order/.nodewalk style={branch={{from to={1+round(n_children()/3)}{2*round(n_children()/3)}},tree}}, draw tree, TeX={~~},
+          draw tree processing order/.nodewalk style={branch={{from to={1+2*round(n_children()/3)}{n_children()}},tree}}, draw tree,
+        }
       }
     }
     [!\bigbadprocesslist]
@@ -5524,7 +5535,7 @@
   
 \end{indexitemprocessinstruction}
 
-\begin{indexitemprocessinstruction}{p}([$n$]){\protect\emph{p}process}
+\begin{indexitemprocessinstruction}{p}([$n$]){\protect\emph{p}rocess}
   {&\index{meta>process}&\meta{result}&}
 
   Execute an embedded call of the argument processor.
@@ -6386,6 +6397,21 @@
 \subsubsection{v2.1}
 
 \begin{description}
+\item[v2.1.2 (2016/12/31)] \mbox{}
+
+  Bugfixes:
+  \begin{syntax}
+  \compatitem{all}{2.1.1-loops}
+    A level of hash doubling was unnecessarily introduced for the \meta{keylist} argument of all
+    loops (\S\ref{ref:loops}), and the \meta{nodewalk} argument of \index{process keylist'} and
+    \index{process delayed}. Use this key to revert to the old behaviour.
+  \end{syntax}
+
+  Minor improvements:
+  \begin{itemize}
+  \item Implemented key \index{also}.
+  \end{itemize}
+  
 \item[v2.1.1 (2016/12/18)] \mbox{}
   
   Minor improvements:
@@ -6855,7 +6881,7 @@
 %\addtocontents{toc}{\protect\iffalse{\protect\fi}}
 %http://tex.stackexchange.com/questions/10291/addtocontents-at-end-of-document-not-getting-written-to-toc-file
 \makeatletter
-\write\@auxout{\noexpand\@writefile{toc}{\noexpand\iffalse{\noexpand\fi}}}
+\immediate\write\@auxout{\noexpand\@writefile{toc}{\noexpand\iffalse{\noexpand\fi}}}
 \makeatother
 
 

Modified: trunk/Master/texmf-dist/doc/latex/forest/forest.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/forest/forest.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/forest/forest.dtx	2016-12-31 21:25:46 UTC (rev 42819)
+++ trunk/Master/texmf-dist/source/latex/forest/forest.dtx	2016-12-31 21:26:04 UTC (rev 42820)
@@ -1,4 +1,4 @@
-% \CheckSum{16606}
+% \CheckSum{16610}
 % \iffalse meta-comment
 % forest.dtx
 %% `forest' is a `pgf/tikz'-based package for drawing (linguistic) trees.
@@ -83,7 +83,7 @@
 %
 % \section{Identification}
 %    \begin{macrocode}
-\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}
@@ -318,18 +318,18 @@
 %    \begin{macrocode}
 \def\newsafeloop#1{%
   \csdef{safeloop@#1}##1\saferepeat{%
-    \edef\safeloop at marshal{%
-      \noexpand\csdef{safeiterate@#1}{%
-        \unexpanded{##1}\relax
-        \noexpand\expandafter
-        \expandonce{\csname safeiterate@#1\endcsname}%
-        \noexpand\fi
-      }%
-    }\safeloop at marshal
+    \forest at temp@toks{##1}%
+    \csedef{safeiterate@#1}{%
+      \the\forest at temp@toks\relax
+      \noexpand\expandafter
+      \expandonce{\csname safeiterate@#1\endcsname}%
+      \noexpand\fi
+    }%
     \csuse{safeiterate@#1}%
     \advance\noexpand\safeloop at depth-1\relax
     \cslet{safeiterate@#1}\relax
   }%
+  \expandafter\newif\csname ifsafebreak@\the\safeloop at depth\endcsname
 }%
 \newcount\safeloop at depth
 \def\safeloop{%
@@ -347,14 +347,13 @@
 %    \begin{macrocode}
 \def\newsafeRKloop#1{%
   \csdef{safeRKloop@#1}##1\safeRKrepeat{%
-    \edef\safeRKloop at marshal{%
-      \noexpand\csdef{safeRKiterate@#1}{%
-        \unexpanded{##1}\relax
-        \noexpand\expandafter
-        \expandonce{\csname safeRKiterate@#1\endcsname}%
-        \noexpand\fi
-      }%
-    }\safeRKloop at marshal
+    \forest at temp@toks{##1}%
+    \csedef{safeRKiterate@#1}{%
+      \the\forest at temp@toks\relax
+      \noexpand\expandafter
+      \expandonce{\csname safeRKiterate@#1\endcsname}%
+      \noexpand\fi
+    }%
     \csuse{safeRKiterate@#1}%
     \advance\noexpand\safeRKloop at depth-1\relax
     \cslet{safeRKiterate@#1}\relax
@@ -4036,15 +4035,16 @@
   \expandafter\forest at processor@r@\expandafter{\forest at temp}%
 }
 \def\forest at processor@r@#1{%
-  \forest at temp@toks{}%
+  \forest at process@left at esetappend{}%
   \def\forest at tempcomma{}%
   \pgfqkeys{/forest}{split={#1}{,}{process at rk}}%
-  \forest at process@left at esetappend{\the\forest at temp@toks}%
   \let\forestmathresulttype\forestmathtype at generic
 }
 \forestset{%
   process at rk/.code={%
-    \epretotoks\forest at temp@toks{#1\forest at tempcomma}%
+    \forest at process@left at toppop\forest at temp
+    \forest at temp@toks{#1}%
+    \forest at process@left at esetappend{\the\forest at temp@toks\forest at tempcomma\expandonce{\forest at temp}}%
     \def\forest at tempcomma{,}%
   }%
 }
@@ -4515,6 +4515,7 @@
   TeX'/.code={\appto\forest at externalize@loadimages{#1}#1},
   TeX''/.code={\appto\forest at 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
@@ -5758,10 +5759,8 @@
     save and restore register={branched at nodewalk}{
       branch at temp@toks={},
       split/.process={r}{#1}{,}{#2},
-      branch at temp@style/.style/.register=branch at temp@toks,
-      branch at temp@style,
-      branch at temp@style/.style/.register=branched at nodewalk,
-      branch at temp@style,
+      also/.register=branch at temp@toks,
+      also/.register=branched at nodewalk,
     }
   },
   nodewalk/branch at build@realstep/.style={% #1 = nodewalk for this branch
@@ -6232,14 +6231,11 @@
 \pgfqkeys{/forest/nodewalk}{
   .unknown/.code={%
     \forest at nodewalk@areshortstepsfalse
-    \pgfkeysifdefined{/forest/\pgfkeyscurrentname/@.cmd}{%
-    }{%
-      \ifx\pgfkeyscurrentvalue\pgfkeysnovalue at text % no value, so possibly short steps
-        \forest at nodewalk@shortsteps at resolution{}%
-        \forest at nodewalk@areshortstepstrue
-        \expandafter\forest at nodewalk@shortsteps\pgfkeyscurrentname==========,% "=" and "," cannot be short steps, so they are good as delimiters
-      \fi
-    }%
+    \ifx\pgfkeyscurrentvalue\pgfkeysnovalue at text % no value, so possibly short steps
+      \forest at nodewalk@shortsteps at resolution{}%
+      \forest at nodewalk@areshortstepstrue
+      \expandafter\forest at nodewalk@shortsteps\pgfkeyscurrentname==========,% "=" and "," cannot be short steps, so they are good as delimiters
+    \fi
     \ifforest at nodewalk@areshortsteps
       \@escapeif{\expandafter\pgfkeysalso\expandafter{\the\forest at nodewalk@shortsteps at resolution}}%
     \else

Modified: trunk/Master/texmf-dist/tex/latex/forest/forest-compat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/forest/forest-compat.sty	2016-12-31 21:25:46 UTC (rev 42819)
+++ trunk/Master/texmf-dist/tex/latex/forest/forest-compat.sty	2016-12-31 21:26:04 UTC (rev 42820)
@@ -30,6 +30,10 @@
 }
 \forestset{@@deprecated/.code={\forest at deprecated{#1}}}
 \def\forestcompat#1{\pgfqkeys{/forest/@compat}{#1}}
+\def\forestcompat at patchfailed{%
+  \pgfkeys at split@path
+  \PackageError{forest}{Patching in compat=\pgfkeyscurrentname\space failed}{}%
+}
 \forestcompat{
   silent/.code={\def\forest at deprecated##1{}},
   %%% begin listing region: compat_keys
@@ -36,30 +40,29 @@
   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 at iflibraryloaded{edges}{%
-      \expandafter\patchcmd\csname @pgfk@/forest/folder/. at cmd\endcsname
-        {parent anchor=-children last}{parent anchor=parent last}{}{}%
-      \expandafter\patchcmd\csname @pgfk@/forest/folder/. at cmd\endcsname
-        {edge={rotate/.option=!parent.grow},}{edge={rotate/.pgfmath=grow()}}{}{}%
+      \expandafter\patchcmd\csname pgfk@/forest/folder/. at cmd\endcsname
+        {parent anchor=-children last}
+        {parent anchor=parent last}
+        {}{\forestcompat at patchfailed}%
+      \expandafter\patchcmd\csname pgfk@/forest/folder/. at cmd\endcsname
+        {edge={rotate/.option=!parent.grow},}
+        {edge={rotate/.pgfmath=grow()}}
+        {}{\forestcompat at patchfailed}%
     }{%
       \appto\forest at compat@libraries at edges{\forestcompat{2.0-folder}}%
     }%
   },
+  2.1.1-loops/.code={%
+    \patchcmd\newsafeRKloop % pre-{##1}
+      {\forest at temp@toks}%
+      {%
+        \forest at deprecated{hash-doubling loops from pre-2.1.2}%
+        \def\forest at temp
+      }%
+      {}{\forestcompat at patchfailed}%
+    \patchcmd\newsafeRKloop % post-{##1}
+      {\csedef}%
+      {\forest at temp@toks\expandafter{\forest at temp}\csedef}%
+      {}{\forestcompat at patchfailed}%
+  },
 }
 \expandafter\forestcompat\expandafter{\forest at compat}

Modified: trunk/Master/texmf-dist/tex/latex/forest/forest.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/forest/forest.sty	2016-12-31 21:25:46 UTC (rev 42819)
+++ trunk/Master/texmf-dist/tex/latex/forest/forest.sty	2016-12-31 21:26:04 UTC (rev 42820)
@@ -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 at marshal{%
-      \noexpand\csdef{safeiterate@#1}{%
-        \unexpanded{##1}\relax
-        \noexpand\expandafter
-        \expandonce{\csname safeiterate@#1\endcsname}%
-        \noexpand\fi
-      }%
-    }\safeloop at marshal
+    \forest at temp@toks{##1}%
+    \csedef{safeiterate@#1}{%
+      \the\forest at temp@toks\relax
+      \noexpand\expandafter
+      \expandonce{\csname safeiterate@#1\endcsname}%
+      \noexpand\fi
+    }%
     \csuse{safeiterate@#1}%
     \advance\noexpand\safeloop at depth-1\relax
     \cslet{safeiterate@#1}\relax
   }%
+  \expandafter\newif\csname ifsafebreak@\the\safeloop at depth\endcsname
 }%
 \newcount\safeloop at depth
 \def\safeloop{%
@@ -263,14 +263,13 @@
 \def\safeloopn{\csuse{safeloopn@\the\safeloop at depth}}%
 \def\newsafeRKloop#1{%
   \csdef{safeRKloop@#1}##1\safeRKrepeat{%
-    \edef\safeRKloop at marshal{%
-      \noexpand\csdef{safeRKiterate@#1}{%
-        \unexpanded{##1}\relax
-        \noexpand\expandafter
-        \expandonce{\csname safeRKiterate@#1\endcsname}%
-        \noexpand\fi
-      }%
-    }\safeRKloop at marshal
+    \forest at temp@toks{##1}%
+    \csedef{safeRKiterate@#1}{%
+      \the\forest at temp@toks\relax
+      \noexpand\expandafter
+      \expandonce{\csname safeRKiterate@#1\endcsname}%
+      \noexpand\fi
+    }%
     \csuse{safeRKiterate@#1}%
     \advance\noexpand\safeRKloop at depth-1\relax
     \cslet{safeRKiterate@#1}\relax
@@ -3308,15 +3307,16 @@
   \expandafter\forest at processor@r@\expandafter{\forest at temp}%
 }
 \def\forest at processor@r@#1{%
-  \forest at temp@toks{}%
+  \forest at process@left at esetappend{}%
   \def\forest at tempcomma{}%
   \pgfqkeys{/forest}{split={#1}{,}{process at rk}}%
-  \forest at process@left at esetappend{\the\forest at temp@toks}%
   \let\forestmathresulttype\forestmathtype at generic
 }
 \forestset{%
   process at rk/.code={%
-    \epretotoks\forest at temp@toks{#1\forest at tempcomma}%
+    \forest at process@left at toppop\forest at temp
+    \forest at temp@toks{#1}%
+    \forest at process@left at esetappend{\the\forest at temp@toks\forest at tempcomma\expandonce{\forest at temp}}%
     \def\forest at tempcomma{,}%
   }%
 }
@@ -3775,6 +3775,7 @@
   TeX'/.code={\appto\forest at externalize@loadimages{#1}#1},
   TeX''/.code={\appto\forest at 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 at nodewalk}{
       branch at temp@toks={},
       split/.process={r}{#1}{,}{#2},
-      branch at temp@style/.style/.register=branch at temp@toks,
-      branch at temp@style,
-      branch at temp@style/.style/.register=branched at nodewalk,
-      branch at temp@style,
+      also/.register=branch at temp@toks,
+      also/.register=branched at nodewalk,
     }
   },
   nodewalk/branch at build@realstep/.style={% #1 = nodewalk for this branch
@@ -5448,14 +5447,11 @@
 \pgfqkeys{/forest/nodewalk}{
   .unknown/.code={%
     \forest at nodewalk@areshortstepsfalse
-    \pgfkeysifdefined{/forest/\pgfkeyscurrentname/@.cmd}{%
-    }{%
-      \ifx\pgfkeyscurrentvalue\pgfkeysnovalue at text % no value, so possibly short steps
-        \forest at nodewalk@shortsteps at resolution{}%
-        \forest at nodewalk@areshortstepstrue
-        \expandafter\forest at nodewalk@shortsteps\pgfkeyscurrentname==========,% "=" and "," cannot be short steps, so they are good as delimiters
-      \fi
-    }%
+    \ifx\pgfkeyscurrentvalue\pgfkeysnovalue at text % no value, so possibly short steps
+      \forest at nodewalk@shortsteps at resolution{}%
+      \forest at nodewalk@areshortstepstrue
+      \expandafter\forest at nodewalk@shortsteps\pgfkeyscurrentname==========,% "=" and "," cannot be short steps, so they are good as delimiters
+    \fi
     \ifforest at nodewalk@areshortsteps
       \@escapeif{\expandafter\pgfkeysalso\expandafter{\the\forest at nodewalk@shortsteps at resolution}}%
     \else



More information about the tex-live-commits mailing list