From 5074e2cf0059ecf84df320cc2ca20dfe1f6200ca Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 16 Nov 2012 00:37:10 +0000 Subject: forest (15nov12) git-svn-id: svn://tug.org/texlive/trunk@28269 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/forest/forest.sty | 41 ++++++++++++++++++++------- 1 file changed, 31 insertions(+), 10 deletions(-) (limited to 'Master/texmf-dist/tex/latex/forest/forest.sty') diff --git a/Master/texmf-dist/tex/latex/forest/forest.sty b/Master/texmf-dist/tex/latex/forest/forest.sty index 1759c5d94d3..26493968160 100644 --- a/Master/texmf-dist/tex/latex/forest/forest.sty +++ b/Master/texmf-dist/tex/latex/forest/forest.sty @@ -29,16 +29,16 @@ %% This work consists of the files forest.dtx and forest.ins %% and the derived file forest.sty. %% -\ProvidesPackage{forest}[2012/10/31 v1.0 Drawing (linguistic) trees] +\ProvidesPackage{forest}[2012/10/31 v1.01 Drawing (linguistic) trees] -\RequirePackage{tikz} +\RequirePackage{tikz}[2010/10/13] \usetikzlibrary{shapes} \usetikzlibrary{fit} \usetikzlibrary{calc} \usepgflibrary{intersections} \RequirePackage{pgfopts} -\RequirePackage{etoolbox} +\RequirePackage{etoolbox}[2010/08/21] \RequirePackage{environ} %\usepackage[trace]{trace-pgfkeys} @@ -281,6 +281,12 @@ \ifx\pgfpointintersectionoflines\forest@original@pgfpointintersectionoflines \let\pgfpointintersectionoflines\forest@patched@pgfpointintersectionoflines \fi + + % hah: hacking forest --- it depends on some details of PGF implementation +\def\forest@pgf@notyetpositioned{not yet positionedPGFINTERNAL}% +\expandafter\ifstrequal\expandafter{\pgfversion}{2.10}{% + \def\forest@pgf@notyetpositioned{not yet positioned@}% +}{} \long\def\@escapeif#1#2\fi{\fi#1} \long\def\@escapeifif#1#2\fi#3\fi{\fi\fi#1} \def\newloop#1{% @@ -2304,7 +2310,22 @@ \locbox\forest@temp@box \forestolet{box}\forest@temp@box }% + \def\forest@node@typeset@restore{}% + \ifdefined\ifsa@tikz\forest@standalone@hack\fi \forest@next + \forest@node@typeset@restore +} +\def\forest@standalone@hack{% + \ifsa@tikz + \let\forest@standalone@tikzpicture\tikzpicture + \let\forest@standalone@endtikzpicture\endtikzpicture + \let\tikzpicture\sa@orig@tikzpicture + \let\endtikzpicture\sa@orig@endtikzpicture + \def\forest@node@typeset@restore{% + \let\tikzpicture\forest@standalone@tikzpicture + \let\endtikzpicture\forest@standalone@endtikzpicture + }% + \fi } \newbox\forest@box \def\forest@node@typeset@{% @@ -2316,32 +2337,32 @@ \pgfpositionnodelater{\forest@positionnodelater@save}% \forest@temp@nodeformat \pgfinterruptpath - \pgfpointanchor{not yet positioned@\forest@nodename}{forestcomputenodeboundary}% + \pgfpointanchor{\forest@pgf@notyetpositioned\forest@nodename}{forestcomputenodeboundary}% \endpgfinterruptpath %\forest@compute@node@boundary\forest@temp %\xappto\forest@smuggle{\noexpand\forestoset{boundary}{\expandonce\forest@temp}}% \if\relax\forestove{parent anchor}\relax - \pgfpointanchor{not yet positioned@\forest@nodename}{center}% + \pgfpointanchor{\forest@pgf@notyetpositioned\forest@nodename}{center}% \else - \pgfpointanchor{not yet positioned@\forest@nodename}{\forestove{parent anchor}}% + \pgfpointanchor{\forest@pgf@notyetpositioned\forest@nodename}{\forestove{parent anchor}}% \fi \xappto\forest@smuggle{% \noexpand\forestoset{parent@anchor}{% \noexpand\noexpand\noexpand\pgf@x=\the\pgf@x\relax \noexpand\noexpand\noexpand\pgf@y=\the\pgf@y\relax}}% \if\relax\forestove{child anchor}\relax - \pgfpointanchor{not yet positioned@\forest@nodename}{center}% + \pgfpointanchor{\forest@pgf@notyetpositioned\forest@nodename}{center}% \else - \pgfpointanchor{not yet positioned@\forest@nodename}{\forestove{child anchor}}% + \pgfpointanchor{\forest@pgf@notyetpositioned\forest@nodename}{\forestove{child anchor}}% \fi \xappto\forest@smuggle{% \noexpand\forestoeset{child@anchor}{% \noexpand\noexpand\noexpand\pgf@x=\the\pgf@x\relax \noexpand\noexpand\noexpand\pgf@y=\the\pgf@y\relax}}% \if\relax\forestove{anchor}\relax - \pgfpointanchor{not yet positioned@\forest@nodename}{center}% + \pgfpointanchor{\forest@pgf@notyetpositioned\forest@nodename}{center}% \else - \pgfpointanchor{not yet positioned@\forest@nodename}{\forestove{anchor}}% + \pgfpointanchor{\forest@pgf@notyetpositioned\forest@nodename}{\forestove{anchor}}% \fi \xappto\forest@smuggle{% \noexpand\forestoeset{@anchor}{% -- cgit v1.2.3