summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/pgf-pie
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/pgf-pie')
-rw-r--r--graphics/pgf/contrib/pgf-pie/RELEASE_NOTES.md14
-rw-r--r--graphics/pgf/contrib/pgf-pie/pgf-pie-manual.pdfbin181416 -> 193458 bytes
-rw-r--r--graphics/pgf/contrib/pgf-pie/pgf-pie-manual.tex10
-rw-r--r--graphics/pgf/contrib/pgf-pie/pgf-pie.sty2
-rw-r--r--graphics/pgf/contrib/pgf-pie/tikzlibrarypie.code.tex34
5 files changed, 41 insertions, 19 deletions
diff --git a/graphics/pgf/contrib/pgf-pie/RELEASE_NOTES.md b/graphics/pgf/contrib/pgf-pie/RELEASE_NOTES.md
index a70048c12f..7f474da868 100644
--- a/graphics/pgf/contrib/pgf-pie/RELEASE_NOTES.md
+++ b/graphics/pgf/contrib/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/graphics/pgf/contrib/pgf-pie/pgf-pie-manual.pdf b/graphics/pgf/contrib/pgf-pie/pgf-pie-manual.pdf
index f8485f2bf0..6a6cc8411e 100644
--- a/graphics/pgf/contrib/pgf-pie/pgf-pie-manual.pdf
+++ b/graphics/pgf/contrib/pgf-pie/pgf-pie-manual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-pie/pgf-pie-manual.tex b/graphics/pgf/contrib/pgf-pie/pgf-pie-manual.tex
index c1e16c4e06..a63da31139 100644
--- a/graphics/pgf/contrib/pgf-pie/pgf-pie-manual.tex
+++ b/graphics/pgf/contrib/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/graphics/pgf/contrib/pgf-pie/pgf-pie.sty b/graphics/pgf/contrib/pgf-pie/pgf-pie.sty
index b717b076a1..05e8e85ec5 100644
--- a/graphics/pgf/contrib/pgf-pie/pgf-pie.sty
+++ b/graphics/pgf/contrib/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/graphics/pgf/contrib/pgf-pie/tikzlibrarypie.code.tex b/graphics/pgf/contrib/pgf-pie/tikzlibrarypie.code.tex
index dd949d9644..6612fceb13 100644
--- a/graphics/pgf/contrib/pgf-pie/tikzlibrarypie.code.tex
+++ b/graphics/pgf/contrib/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{%