texlive[44797] Master/texmf-dist: forest (14jul17)
commits+karl at tug.org
commits+karl at tug.org
Sat Jul 15 00:14:58 CEST 2017
Revision: 44797
http://tug.org/svn/texlive?view=revision&revision=44797
Author: karl
Date: 2017-07-15 00:14:58 +0200 (Sat, 15 Jul 2017)
Log Message:
-----------
forest (14jul17)
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-libs.dtx
trunk/Master/texmf-dist/source/latex/forest/forest.dtx
trunk/Master/texmf-dist/tex/latex/forest/forest-lib-linguistics.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 2017-07-14 17:17:43 UTC (rev 44796)
+++ trunk/Master/texmf-dist/doc/latex/forest/README 2017-07-14 22:14:58 UTC (rev 44797)
@@ -1,4 +1,4 @@
-LaTeX package: forest [2017/02/02 v2.1.4 Drawing (linguistic) trees]
+LaTeX package: forest [2017/07/14 v2.1.5 Drawing (linguistic) trees]
Copyright (c) 2012-2017 Saso Zivanovic
(Sa\v{s}o \v{Z}ivanovi\'{c})
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 2017-07-14 17:17:43 UTC (rev 44796)
+++ trunk/Master/texmf-dist/doc/latex/forest/forest-doc.tex 2017-07-14 22:14:58 UTC (rev 44797)
@@ -1838,7 +1838,7 @@
For example, the |linguistics| library defines c-command related nodewalks, changes the default
parent--child edges to south--north (the main package default is border--border) and sets the
-baseline to the root node. Thus, if you write |\usepackage[linguistics]{forest}| in your preamble,
+baseline to the root\footnote{For details, see \S\ref{sec:library-linguistics}.} node. Thus, if you write |\usepackage[linguistics]{forest}| in your preamble,
or use macro \cmdname{forestapplylibrarydefaults} like below, you get the following:
\begin{forestexample}[tree bin=minipage,index={for step,c-commanded}]
@@ -2016,6 +2016,15 @@
\indexitem(none){bracket key>action character}|=|\meta{character}
\end{syntax}
+\begin{advise}
+\item Careful when setting the \index{opening bracket} to |(|, %)
+ as an initial |(| %)
+ is understood as the delimiter of the optional \meta{config} argument of the
+ \index{environment>forest} environment or \index{macro>Forest} macro. The workaround is to either
+ provide an empty \meta{config} argument |()|, or put some whitespace (e.g.\ a newline) before the
+ tree specification.
+\end{advise}
+
By redefining the following two keys, the bracket parser can be used outside \foRest;.
\begin{syntax}
\indexitem{bracket key>new node}|=|\meta{preamble}\meta{node specification}\meta{csname}.
@@ -6409,6 +6418,14 @@
\subsubsection{v2.1}
\begin{description}
+\item[v2.1.5 (2017/07/14)] \mbox{}
+ Minor improvements:
+ \begin{itemize}
+ \item Smarter \index{baseline} defaults for the \reflibrary{linguistics} library.
+ \item Yield warning when the \index{baseline} is set to a node that is not drawn (e.g.\ a
+ \index{phantom} node).
+ \end{itemize}
+
\item[v2.1.4 (2017/02/02)] \mbox{}
Performance:
Modified: trunk/Master/texmf-dist/doc/latex/forest/forest.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/forest/forest-libs.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/forest/forest-libs.dtx 2017-07-14 17:17:43 UTC (rev 44796)
+++ trunk/Master/texmf-dist/source/latex/forest/forest-libs.dtx 2017-07-14 22:14:58 UTC (rev 44797)
@@ -45,12 +45,15 @@
%\fi
% \librarysection{linguistics}
% \begin{macrocode}
-\ProvidesForestLibrary{linguistics}[2017/01/27 v0.1.1]
+\ProvidesForestLibrary{linguistics}[2017/07/14 v0.1.2]
% \end{macrocode}
%
% Defaults:
% \begin{macrocode}
\forestset{
+ linguistics at set@baseline/.style={
+ if phantom={for next node=linguistics at set@baseline}{baseline}
+ },
libraries/linguistics/defaults/.style={
default preamble={
% \end{macrocode}
@@ -59,8 +62,12 @@
sn edges,
% \end{macrocode}
% The root of the tree will be aligned with the text \dots\ or, more commonly, the example number.
+% More precisely, we actually align the first (in linear order) non-phantom node. This covers the
+% common case of side-by-side trees joined with a phantom root.
% \begin{macrocode}
- baseline,
+ before drawing tree={
+ if nodewalk valid={name=forest at baseline@node}{}{linguistics at set@baseline},
+ },
% \end{macrocode}
% Enable (centered) multi-line nodes.
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/forest/forest.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/forest/forest.dtx 2017-07-14 17:17:43 UTC (rev 44796)
+++ trunk/Master/texmf-dist/source/latex/forest/forest.dtx 2017-07-14 22:14:58 UTC (rev 44797)
@@ -1,4 +1,4 @@
-% \CheckSum{16623}
+% \CheckSum{16651}
% \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}[2017/02/02 v2.1.4 Drawing (linguistic) trees]
+\ProvidesPackage{forest}[2017/07/14 v2.1.5 Drawing (linguistic) trees]
\RequirePackage{tikz}[2013/12/13]
\usetikzlibrary{shapes}
@@ -4079,7 +4079,7 @@
\pgfkeyssetvalue{#1'/option at name}{#3}%
\forest at copycommandkey{#1+}{#1}%
\pgfkeysalso{#1-/.code={%
- \forest at fornode{register}{%
+ \forest at fornode{}{%
\forest at node@removekeysfromkeylist{##1}{#3}%
}}}%
\pgfkeyssetvalue{#1-/option at name}{#3}%
@@ -5178,7 +5178,7 @@
#4%
\let\forest at temp@pgfmathpostparse\pgfmathpostparse
\let\pgfmathpostparse\forest at aggregate@pgfmathpostparse
- \forestmath at convert@to\forestmathtype at dimen{\forestmathresult}
+ \forestmath at convert@to\forestmathtype at dimen{\forestmathresult}%
\pgfmathqparse{\forestmathresult}%
\let\pgfmathpostparse\forest at temp@pgfmathpostparse
\forestrlet{aggregate result}\pgfmathresult
@@ -5359,7 +5359,7 @@
\ifx\forest at nodewalk@config at oninvalid\forest at nodewalk@oninvalid at inherited@text
\edef\forest at nodewalk@config at oninvalid{\forest at nodewalk@oninvalid}%
\fi
- \edef\forest at marshal{%
+ \edef\forest at nw@marshal{%
\noexpand\pgfqkeys{/forest/nodewalk}{\unexpanded{#1}}%
\csname forest at nodewalk@config at everystep@\forest at nodewalk@config at everystep@method @after\endcsname
\csname forest at nodewalk@config at history@\forest at nodewalk@config at history@method @after\endcsname
@@ -5368,8 +5368,10 @@
\csname forest at nodewalk@config at everystep@\forest at nodewalk@config at everystep@method @before\endcsname{#2}%
\csname forest at nodewalk@config at history@\forest at nodewalk@config at history@method @before\endcsname
\edef\forest at nodewalk@oninvalid{\forest at nodewalk@config at oninvalid}%
- \forest at nodewalk@fakefalse
- \forest at marshal
+ \forest at saveandrestoreifcs{forest at nodewalk@fake}{%
+ \forest at nodewalk@fakefalse
+ \forest at nw@marshal
+ }%
}
\pgfmathdeclarefunction{valid}{1}{%
\forest at forthis{%
@@ -5488,15 +5490,15 @@
\expandafter\forest at temp@toks\expandafter{\expandafter\forest at saveandrestoremacro\expandafter\forest at nodewalk@currentstepname\expandafter{\the\forest at temp@toks}}%
\ifforestdebugnodewalks
\epretotoks\forest at temp@toks{\noexpand\typeout{Starting step "#1" from id=\noexpand\forest at cn
- \ifnum\forest at nodewalkstephandler@nargs>0 \space with args ####1\fi
- \ifnum\forest at nodewalkstephandler@nargs>1 ,####2\fi
- \ifnum\forest at nodewalkstephandler@nargs>2 ,####3\fi
- \ifnum\forest at nodewalkstephandler@nargs>3 ,####4\fi
- \ifnum\forest at nodewalkstephandler@nargs>4 ,####5\fi
- \ifnum\forest at nodewalkstephandler@nargs>5 ,####6\fi
- \ifnum\forest at nodewalkstephandler@nargs>6 ,####7\fi
- \ifnum\forest at nodewalkstephandler@nargs>7 ,####8\fi
- \ifnum\forest at nodewalkstephandler@nargs>8 ,####9\fi
+ \ifnum\forest at nodewalkstephandler@nargs>0 \space with args \noexpand\unexpanded{####1}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>1 ,\noexpand\unexpanded{####2}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>2 ,\noexpand\unexpanded{####3}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>3 ,\noexpand\unexpanded{####4}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>4 ,\noexpand\unexpanded{####5}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>5 ,\noexpand\unexpanded{####6}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>6 ,\noexpand\unexpanded{####7}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>7 ,\noexpand\unexpanded{####8}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>8 ,\noexpand\unexpanded{####9}\fi
}}%
\fi
\def\forest at temp{/forest/nodewalk/#1/.code}%
@@ -8642,16 +8644,21 @@
}%
\forest at node@Ifnamedefined{forest at baseline@node}{%
\edef\forest at baseline@id{\forest at node@Nametoid{forest at baseline@node}}%
- \ifcsdef{forest at drawn@\forest at baseline@id}{%
- \edef\forest at marshal{%
- \noexpand\pgfsetbaselinepointlater{%
- \noexpand\pgfpointanchor
- {\forestOve{\forest at baseline@id}{name}}%
- {\forestOve{\forest at baseline@id}{anchor}}%
- }%
- }\forest at marshal
- }{}%
- }{}%
+ \ifnum\forest at baseline@id=0
+ \else
+ \ifcsdef{forest at drawn@\forest at baseline@id}{%
+ \edef\forest at marshal{%
+ \noexpand\pgfsetbaselinepointlater{%
+ \noexpand\pgfpointanchor
+ {\forestOve{\forest at baseline@id}{name}}%
+ {\forestOve{\forest at baseline@id}{anchor}}%
+ }%
+ }\forest at marshal
+ }{%
+ \PackageWarning{forest}{Baseline node (id=\forest at cn) was not drawn (most likely it's a phantom node)}%
+ }%
+ \fi
+ }%
\forest at clear@drawn
}
\def\forest at draw@node{%
@@ -10885,7 +10892,10 @@
\forest at global@marshal
}
% \end{macrocode}
-%
+% Fill in the values of the invalid node. (It's now easy to test for |id=0|.)
+% \begin{macrocode}
+\forest at node@init
+% \end{macrocode}
% \section{Compatibility with previous versions}
% \begin{macrocode}
\ifdefempty{\forest at compat}{}{%
Modified: trunk/Master/texmf-dist/tex/latex/forest/forest-lib-linguistics.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/forest/forest-lib-linguistics.sty 2017-07-14 17:17:43 UTC (rev 44796)
+++ trunk/Master/texmf-dist/tex/latex/forest/forest-lib-linguistics.sty 2017-07-14 22:14:58 UTC (rev 44797)
@@ -29,12 +29,17 @@
%% `forest.dtx', or the derived `forest.sty'.
%%
\RequirePackage{forest}
-\ProvidesForestLibrary{linguistics}[2017/01/27 v0.1.1]
+\ProvidesForestLibrary{linguistics}[2017/07/14 v0.1.2]
\forestset{
+ linguistics at set@baseline/.style={
+ if phantom={for next node=linguistics at set@baseline}{baseline}
+ },
libraries/linguistics/defaults/.style={
default preamble={
sn edges,
- baseline,
+ before drawing tree={
+ if nodewalk valid={name=forest at baseline@node}{}{linguistics at set@baseline},
+ },
for tree={align=center},
},
},
Modified: trunk/Master/texmf-dist/tex/latex/forest/forest.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/forest/forest.sty 2017-07-14 17:17:43 UTC (rev 44796)
+++ trunk/Master/texmf-dist/tex/latex/forest/forest.sty 2017-07-14 22:14:58 UTC (rev 44797)
@@ -44,7 +44,7 @@
%% - LICENCE
%% To use the package, only the files marked with + need to be installed.
%%
-\ProvidesPackage{forest}[2017/02/02 v2.1.4 Drawing (linguistic) trees]
+\ProvidesPackage{forest}[2017/07/14 v2.1.5 Drawing (linguistic) trees]
\RequirePackage{tikz}[2013/12/13]
\usetikzlibrary{shapes}
@@ -3346,7 +3346,7 @@
\pgfkeyssetvalue{#1'/option at name}{#3}%
\forest at copycommandkey{#1+}{#1}%
\pgfkeysalso{#1-/.code={%
- \forest at fornode{register}{%
+ \forest at fornode{}{%
\forest at node@removekeysfromkeylist{##1}{#3}%
}}}%
\pgfkeyssetvalue{#1-/option at name}{#3}%
@@ -4419,7 +4419,7 @@
#4%
\let\forest at temp@pgfmathpostparse\pgfmathpostparse
\let\pgfmathpostparse\forest at aggregate@pgfmathpostparse
- \forestmath at convert@to\forestmathtype at dimen{\forestmathresult}
+ \forestmath at convert@to\forestmathtype at dimen{\forestmathresult}%
\pgfmathqparse{\forestmathresult}%
\let\pgfmathpostparse\forest at temp@pgfmathpostparse
\forestrlet{aggregate result}\pgfmathresult
@@ -4589,7 +4589,7 @@
\ifx\forest at nodewalk@config at oninvalid\forest at nodewalk@oninvalid at inherited@text
\edef\forest at nodewalk@config at oninvalid{\forest at nodewalk@oninvalid}%
\fi
- \edef\forest at marshal{%
+ \edef\forest at nw@marshal{%
\noexpand\pgfqkeys{/forest/nodewalk}{\unexpanded{#1}}%
\csname forest at nodewalk@config at everystep@\forest at nodewalk@config at everystep@method @after\endcsname
\csname forest at nodewalk@config at history@\forest at nodewalk@config at history@method @after\endcsname
@@ -4598,8 +4598,10 @@
\csname forest at nodewalk@config at everystep@\forest at nodewalk@config at everystep@method @before\endcsname{#2}%
\csname forest at nodewalk@config at history@\forest at nodewalk@config at history@method @before\endcsname
\edef\forest at nodewalk@oninvalid{\forest at nodewalk@config at oninvalid}%
- \forest at nodewalk@fakefalse
- \forest at marshal
+ \forest at saveandrestoreifcs{forest at nodewalk@fake}{%
+ \forest at nodewalk@fakefalse
+ \forest at nw@marshal
+ }%
}
\pgfmathdeclarefunction{valid}{1}{%
\forest at forthis{%
@@ -4718,15 +4720,15 @@
\expandafter\forest at temp@toks\expandafter{\expandafter\forest at saveandrestoremacro\expandafter\forest at nodewalk@currentstepname\expandafter{\the\forest at temp@toks}}%
\ifforestdebugnodewalks
\epretotoks\forest at temp@toks{\noexpand\typeout{Starting step "#1" from id=\noexpand\forest at cn
- \ifnum\forest at nodewalkstephandler@nargs>0 \space with args ####1\fi
- \ifnum\forest at nodewalkstephandler@nargs>1 ,####2\fi
- \ifnum\forest at nodewalkstephandler@nargs>2 ,####3\fi
- \ifnum\forest at nodewalkstephandler@nargs>3 ,####4\fi
- \ifnum\forest at nodewalkstephandler@nargs>4 ,####5\fi
- \ifnum\forest at nodewalkstephandler@nargs>5 ,####6\fi
- \ifnum\forest at nodewalkstephandler@nargs>6 ,####7\fi
- \ifnum\forest at nodewalkstephandler@nargs>7 ,####8\fi
- \ifnum\forest at nodewalkstephandler@nargs>8 ,####9\fi
+ \ifnum\forest at nodewalkstephandler@nargs>0 \space with args \noexpand\unexpanded{####1}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>1 ,\noexpand\unexpanded{####2}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>2 ,\noexpand\unexpanded{####3}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>3 ,\noexpand\unexpanded{####4}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>4 ,\noexpand\unexpanded{####5}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>5 ,\noexpand\unexpanded{####6}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>6 ,\noexpand\unexpanded{####7}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>7 ,\noexpand\unexpanded{####8}\fi
+ \ifnum\forest at nodewalkstephandler@nargs>8 ,\noexpand\unexpanded{####9}\fi
}}%
\fi
\def\forest at temp{/forest/nodewalk/#1/.code}%
@@ -7606,16 +7608,21 @@
}%
\forest at node@Ifnamedefined{forest at baseline@node}{%
\edef\forest at baseline@id{\forest at node@Nametoid{forest at baseline@node}}%
- \ifcsdef{forest at drawn@\forest at baseline@id}{%
- \edef\forest at marshal{%
- \noexpand\pgfsetbaselinepointlater{%
- \noexpand\pgfpointanchor
- {\forestOve{\forest at baseline@id}{name}}%
- {\forestOve{\forest at baseline@id}{anchor}}%
- }%
- }\forest at marshal
- }{}%
- }{}%
+ \ifnum\forest at baseline@id=0
+ \else
+ \ifcsdef{forest at drawn@\forest at baseline@id}{%
+ \edef\forest at marshal{%
+ \noexpand\pgfsetbaselinepointlater{%
+ \noexpand\pgfpointanchor
+ {\forestOve{\forest at baseline@id}{name}}%
+ {\forestOve{\forest at baseline@id}{anchor}}%
+ }%
+ }\forest at marshal
+ }{%
+ \PackageWarning{forest}{Baseline node (id=\forest at cn) was not drawn (most likely it's a phantom node)}%
+ }%
+ \fi
+ }%
\forest at clear@drawn
}
\def\forest at draw@node{%
@@ -9243,6 +9250,7 @@
}%
\forest at global@marshal
}
+\forest at node@init
\ifdefempty{\forest at compat}{}{%
\RequirePackage{forest-compat}
}
More information about the tex-live-commits
mailing list