diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-30 20:13:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-30 20:13:30 +0000 |
commit | f172814378170200260a783c76f8bba09bee5967 (patch) | |
tree | 1a48094b8ab2d2c277819cf3f0d53844de84b7e0 /Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex | |
parent | 3f26569dd2bbb857c3b68649d930d990d30b7f72 (diff) |
pgf-pie (30jul21)
git-svn-id: svn://tug.org/texlive/trunk@60115 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex b/Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex index dd949d9644d..6612fceb139 100644 --- a/Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex +++ b/Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex @@ -154,15 +154,26 @@ \newcount\pgfpie@sliceLength \pgfqkeys{/pgfpie}{% + .search also={/tikz,/pgf}, explode/.store in=\pgfpie@explode, color/.store in=\pgfpie@color, radius/.store in=\pgfpie@radius, pos/.store in=\pgfpie@pos, style/.store in=\pgfpie@style, before number/.store in=\pgfpie@beforenumber, - after number/.store in=\pgfpie@afternumber, + after number/.code={% + \def\pgfpie@afternumber{#1}% + \def\pgfpie@late@afternumber{}% + }, text/.store in=\pgfpie@text, - sum/.store in=\pgfpie@sum, + sum/.code={% + \def\pgfpie@sum{#1}% + \pgfpie@ifx\pgfpie@sum\pgfpie@sum@c{% + \def\pgfpie@late@afternumber{\def\pgfpie@afternumber{\%}}% + }{% + \def\pgfpie@late@afternumber{}% + }% + }, rotate/.store in=\pgfpie@rotate, } @@ -205,8 +216,11 @@ } \def\pgfpie@@pie[#1]#2{% - % load default parameters - \pgfqkeys{/pgfpie}{ + \scope[% + % to be compatible with "babel" lib + handle active characters in nodes=false, + % load default parameters + /pgfpie/.cd, explode=0, color={blue!60, cyan!60, yellow!60, orange!60, red!60, blue!60!cyan!60, cyan!60!yellow!60, red!60!cyan!60, @@ -226,14 +240,11 @@ hide number=false, hide label=false, every pie/.try, - }% - % load user's parameters - \pgfqkeys{/pgfpie}{#1}% + % load user's parameters + #1] + % add percentage automatically - \pgfpie@ifx\pgfpie@sum\pgfpie@sum@c{% - \pgfqkeys{/pgfpie}{after number=\%}% - \pgfqkeys{/pgfpie}{#1}% - }{}% + \pgfpie@late@afternumber % legend or not \pgfpie@ifx\pgfpie@text\pgfpie@text@legend{% @@ -280,6 +291,7 @@ \pgfpie@iflegend{% \pgfpie@legend{#2}% }{}}% + \endscope } \def\pgfpie@pie@square#1{% |