diff options
author | Karl Berry <karl@freefriends.org> | 2016-07-30 23:12:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-07-30 23:12:58 +0000 |
commit | ad752eab7e8fbad49b6fbe4a023c71f97b8a9fa1 (patch) | |
tree | ff97d7f86c09fa924b189b1f51c67af324bbbac5 /Master/texmf-dist/tex/latex/binarytree | |
parent | 6b200dd5c2335baa8c78037d8f1c75d1295187f4 (diff) |
binarytree (26jul16)
git-svn-id: svn://tug.org/texlive/trunk@41777 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/binarytree')
-rw-r--r-- | Master/texmf-dist/tex/latex/binarytree/binarytree.sty | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/binarytree/binarytree.sty b/Master/texmf-dist/tex/latex/binarytree/binarytree.sty index c41f83a811d..0fac4e064c6 100644 --- a/Master/texmf-dist/tex/latex/binarytree/binarytree.sty +++ b/Master/texmf-dist/tex/latex/binarytree/binarytree.sty @@ -23,7 +23,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{binarytree} - [2016/07/01 v1.0 Binary trees using TikZ] + [2016/07/25 v1.01 Binary trees using TikZ] \RequirePackage{tikz} \newdimen\BT@bbox@r@width \newdimen\BT@bbox@l@width @@ -384,6 +384,8 @@ \extractcolorspecs{#1}{\tmp@mod}{\tmp@col}% \convertcolorspec{\tmp@mod}{\tmp@col}{rgb}{\tmp@col}% \BT@endgroup@let#2\tmp@col} +\def\BT@at@to@dash#1{\BT@at@to@dash@i#1\@nil} +\def\BT@at@to@dash@i @#1{\ifx\@nil#1\else-#1\expandafter\BT@at@to@dash@i\fi} \def\BT@anchor@or@default#1#2{% \BT@if@blank{#1}{\pgfkeysvalueof{/BT/#2 label anchor}}{#1}} \def\BT@color@or@default#1{\BT@if@blank{#1}{BT@default}{#1}} @@ -392,7 +394,7 @@ \ifx#1#2\expandafter\BT@if@child@is@outer@i\expandafter @\expandafter#2% \else\expandafter\BT@if@child@is@outer@ii\expandafter#2\fi} \def\BT@if@child@is@outer@ii#1{% - \ifx#1\@nil\expandafter\@firstoftwo% + \ifx\@nil#1\expandafter\@firstoftwo% \else\expandafter\expandafter\expandafter\@secondoftwo% \expandafter\BT@gobble@till@nil\fi} \def\BT@check@if@new@level#1{% @@ -598,17 +600,17 @@ \def\BT@draw@tree@children#1#2{% \ifnum\numexpr#2\relax = \numexpr\BT@max@depth\relax\else% child[\ifcsname#1r@ styled\endcsname binary tree/#1r@\else% - binary tree/default\fi] {node {}% right + binary tree/default\fi] {node (btree\BT@at@to@dash{#1r@}) {}% right \BT@draw@tree@children{#1r@}{#2+1} }% child[\ifcsname#1l@ styled\endcsname binary tree/#1l@\else% - binary tree/default\fi] {node {}% left + binary tree/default\fi] {node (btree\BT@at@to@dash{#1l@}) {}% left \BT@draw@tree@children{#1l@}{#2+1} }\fi} \def\BT@draw@tree{% \ifBT@root@edge% \advance\BT@bbox@height\BT@level@distance\relax% \BT@adjust@bbox@sides% \edef\BT@tree{% - \noexpand\node[\ifcsname @ styled\endcsname binary tree/@\fi] {}% + \noexpand\node[\ifcsname @ styled\endcsname binary tree/@\fi] (btree-root) {}% child[\ifcsname @ styled\endcsname binary tree/@\fi] {% node {} \BT@draw@tree@children{@}{\BT@root@depth}}}% \clip (-\BT@bbox@l@width,-\BT@bbox@depth)% @@ -618,7 +620,7 @@ \BT@tree;% \else\BT@adjust@bbox@sides% \edef\BT@tree{% - \noexpand\node[\ifcsname @ styled\endcsname binary tree/@\fi] {}% + \noexpand\node[\ifcsname @ styled\endcsname binary tree/@\fi] (btree-root) {}% \BT@draw@tree@children{@}{\BT@root@depth}}% \clip (-\BT@bbox@l@width,-\BT@bbox@depth)% rectangle (\BT@bbox@r@width,\BT@bbox@height);% |