summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-30 20:13:30 +0000
committerKarl Berry <karl@freefriends.org>2021-07-30 20:13:30 +0000
commitf172814378170200260a783c76f8bba09bee5967 (patch)
tree1a48094b8ab2d2c277819cf3f0d53844de84b7e0
parent3f26569dd2bbb857c3b68649d930d990d30b7f72 (diff)
pgf-pie (30jul21)
git-svn-id: svn://tug.org/texlive/trunk@60115 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md14
-rw-r--r--Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.pdfbin181416 -> 193458 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex10
-rw-r--r--Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex34
5 files changed, 41 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md b/Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md
index a70048c12f8..7f474da868c 100644
--- a/Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md
+++ b/Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md
@@ -1,4 +1,14 @@
+# New features
+
+pgf-pie now wraps the entire pie into a \scope environment and additionally
+defers lookup of unknown /pgfpie keys to the /pgf and /tikz namespaces. This
+paves the way for all kinds of improvements such as easy setting of global pie
+options like font or placement on the background layer. Further is allows
+referring to the pie as a node via local bounding box and moving the pie around
+on the canvas using the shift key.
+
# Bug fixes
-Loop counter variables have been renamed with the \pgfpie@ prefix to avoid
-clashes with user macros.
+pgf-pie tokenizes its arguments which led to breakage when used with babel.
+For now, babel functionality is simply disabled for the entire pie.
+
diff --git a/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.pdf b/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.pdf
index f8485f2bf0b..6a6cc8411e3 100644
--- a/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.pdf
+++ b/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex b/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex
index c1e16c4e068..a63da311393 100644
--- a/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex
+++ b/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex
@@ -5,7 +5,7 @@
\documentclass{ltxdoc}
\usepackage{pgf-pie}
-\usetikzlibrary{shadows}
+\usetikzlibrary{babel, shadows}
\usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead]{geometry}
\usepackage{calc}
@@ -43,7 +43,7 @@
\title{Drawing Pie Chart by using \pgfpiename}
\author{\href{mailto:xuyuan.cn@gmail.com}{Yuan Xu}}
-\date{\today{}~(v0.5)}
+\date{\today{}~(v0.6)}
\maketitle
\begin{abstract}
@@ -60,7 +60,7 @@
\section{Usage}
\subsection{First Pie}
-|\pie| is the only coomand that provided by
+|\pie| is the only command that provided by
\pgfpiename. The argument is a list of number and text
combination in the formate of |number/text|, i.e. |10/A, 20/B, 30/C, 40/D|.
The result is shown in figure \ref{fig:first-pie}.
@@ -96,7 +96,7 @@ is shown in figure \ref{fig:color-wheel}.
\codeexample[scale=0.4,from file={demo/explode.tex}]
\subsection{Angle of slices}
-The value of |sum| indicats the sum of all data in the chart,
+The value of |sum| indicates the sum of all data in the chart,
it is 100 by default. It can be calculated automatically when
|auto| is set. Then the angle of slices are determined by
number value and |sum|.
@@ -149,7 +149,7 @@ the center of the circle.
\codeexample[scale=0.25,from file={demo/square.tex}]
-Note: |explode| has no affects in sqaure chart.
+Note: |explode| has no affects in square chart.
\subsection{Clouds}
diff --git a/Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty b/Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty
index b717b076a1e..05e8e85ec50 100644
--- a/Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty
+++ b/Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty
@@ -1,6 +1,6 @@
% SPDX-License-Identifier: GPL-2.0-only OR LPPL-1.3c
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{pgf-pie}[2021/05/03 v0.5 Some LaTeX macros for pie
+\ProvidesPackage{pgf-pie}[2021/07/30 v0.6 Some LaTeX macros for pie
chart by using PGF/Tikz package.]
\RequirePackage{tikz}
\usetikzlibrary{pie}
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{%