From bb8bcfa015dcd1dd689d8e37cb290245db10c3b8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 20 Feb 2016 23:39:35 +0000 Subject: forest (20feb16) git-svn-id: svn://tug.org/texlive/trunk@39798 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/forest/forest.sty | 33 +++++++++++++++++++-------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'Master/texmf-dist/tex/latex/forest') diff --git a/Master/texmf-dist/tex/latex/forest/forest.sty b/Master/texmf-dist/tex/latex/forest/forest.sty index 6fdbb025c1b..9b7800e7c82 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}[2015/01/30 v2.0.0 Drawing (linguistic) trees] +\ProvidesPackage{forest}[2016/02/20 v2.0.1 Drawing (linguistic) trees] \RequirePackage{tikz}[2013/12/13] \usetikzlibrary{shapes} @@ -84,7 +84,10 @@ \foresttikzcshacktrue \def\forest@loadlibrarieslater{} \AtEndOfPackage{\forest@loadlibrarieslater} -\def\useforestlibrary#1{\forcsvlist\useforestlibrary@{#1}} +\NewDocumentCommand\useforestlibrary{s m}{% + \forcsvlist\useforestlibrary@{#2}% + \IfBooleanT{#1}{\forestapplylibrarydefaults{#2}}% +} \def\useforestlibrary@#1{\RequirePackage{forest-lib-#1}} \def\forestapplylibrarydefaults#1{\forcsvlist\forestapplylibrarydefaults@{#1}} \def\forestapplylibrarydefaults@#1{\forestset{libraries/#1/defaults/.try}} @@ -216,10 +219,15 @@ \expandafter#1\expandafter{\number#4}{#2}{#3}} \def\forest@convert@others@to@underscores#1#2{% \def\forest@cotu@result{}% - \forest@cotu#1\forest@end + \forest@cotu@first#1\forest@end \let#2\forest@cotu@result } \def\forest@cotu{% + \let\forest@cotu@have@num\forest@cotu@have@alpha + \futurelet\forest@cotu@nextchar\forest@cotu@checkforspace +} +\def\forest@cotu@first{% + \let\forest@cotu@have@num\forest@cotu@haveother \futurelet\forest@cotu@nextchar\forest@cotu@checkforspace } \def\forest@cotu@checkforspace{% @@ -241,19 +249,19 @@ \@escapeif\forest@cotu@nospaceB \fi } -\def\forest@cotu@nospaceB{% - \ifcat\forest@cotu@nextchar a% - \let\forest@cotu@next\forest@cotu@have@alphanum +\def\forest@cotu@nospaceB#1{% + \ifcat#1a% + \let\forest@cotu@next\forest@cotu@have@alpha \else - \ifcat\forest@cotu@nextchar 0% - \let\forest@cotu@next\forest@cotu@have@alphanum + \if!\ifnum9<1#1!\fi + \let\forest@cotu@next\forest@cotu@have@num \else \let\forest@cotu@next\forest@cotu@haveother \fi \fi - \forest@cotu@next + \forest@cotu@next#1% } -\def\forest@cotu@have@alphanum#1{% +\def\forest@cotu@have@alpha#1{% \appto\forest@cotu@result{#1}% \forest@cotu } @@ -3360,6 +3368,7 @@ every@step/shared/.code={}, every step/.store in=\forest@nodewalk@config@everystep@method, every step/.prefix style={every@step=#1}, + @history/.is choice, @history/independent/.code={}, @history/inherited/.code={}, @history/shared/.code={}, @@ -4082,6 +4091,8 @@ define long step={preceding siblings reversed}{style}{fake=previous,current and preceding siblings reversed}, define long step={siblings}{style}{for nodewalk'={preceding siblings},following siblings}, define long step={siblings reversed}{style}{for nodewalk'={following siblings reversed},preceding siblings reversed}, + define long step={current and siblings}{style}{for nodewalk'={preceding siblings},current and following siblings}, + define long step={current and siblings reversed}{style}{for nodewalk'={current and following siblings reversed},preceding siblings reversed}, define long step={ancestors}{style}{while={}{parent},last valid}, define long step={current and ancestors}{style}{current,ancestors}, define long step={following nodes}{style}{while={}{next node},last valid}, @@ -4890,6 +4901,8 @@ \forest@Pointanchor{\forest@temp@secondchild}{child anchor}% \advance\pgf@xa\pgf@x\relax\advance\pgf@ya\pgf@y\relax \divide\pgf@xa2 \divide\pgf@ya2 + \forest@pointanchor{parent anchor}% + \advance\pgf@xa-\pgf@x\relax\advance\pgf@ya-\pgf@y\relax \edef\forest@marshal{% \noexpand\pgftransformreset \noexpand\pgftransformrotate{-\forestove{grow}}% -- cgit v1.2.3