texlive[60115] Master/texmf-dist: pgf-pie (30jul21)

commits+karl at tug.org commits+karl at tug.org
Fri Jul 30 22:13:30 CEST 2021


Revision: 60115
          http://tug.org/svn/texlive?view=revision&revision=60115
Author:   karl
Date:     2021-07-30 22:13:30 +0200 (Fri, 30 Jul 2021)
Log Message:
-----------
pgf-pie (30jul21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md
    trunk/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.pdf
    trunk/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex
    trunk/Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty
    trunk/Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex

Modified: trunk/Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md	2021-07-30 01:23:15 UTC (rev 60114)
+++ trunk/Master/texmf-dist/doc/latex/pgf-pie/RELEASE_NOTES.md	2021-07-30 20:13:30 UTC (rev 60115)
@@ -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.
+

Modified: trunk/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex	2021-07-30 01:23:15 UTC (rev 60114)
+++ trunk/Master/texmf-dist/doc/latex/pgf-pie/pgf-pie-manual.tex	2021-07-30 20:13:30 UTC (rev 60115)
@@ -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 at 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 @@
 \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 @@
 
 \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}
 

Modified: trunk/Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty	2021-07-30 01:23:15 UTC (rev 60114)
+++ trunk/Master/texmf-dist/tex/latex/pgf-pie/pgf-pie.sty	2021-07-30 20:13:30 UTC (rev 60115)
@@ -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}

Modified: trunk/Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex	2021-07-30 01:23:15 UTC (rev 60114)
+++ trunk/Master/texmf-dist/tex/latex/pgf-pie/tikzlibrarypie.code.tex	2021-07-30 20:13:30 UTC (rev 60115)
@@ -154,6 +154,7 @@
 \newcount\pgfpie at sliceLength
 
 \pgfqkeys{/pgfpie}{%
+  .search also={/tikz,/pgf},
   explode/.store in=\pgfpie at explode,
   color/.store in=\pgfpie at color,
   radius/.store in=\pgfpie at radius,
@@ -160,9 +161,19 @@
   pos/.store in=\pgfpie at pos,
   style/.store in=\pgfpie at style,
   before number/.store in=\pgfpie at beforenumber,
-  after number/.store in=\pgfpie at afternumber,
+  after number/.code={%
+    \def\pgfpie at afternumber{#1}%
+    \def\pgfpie at late@afternumber{}%
+  },
   text/.store in=\pgfpie at text,
-  sum/.store in=\pgfpie at sum,
+  sum/.code={%
+    \def\pgfpie at sum{#1}%
+    \pgfpie at ifx\pgfpie at sum\pgfpie at sum@c{%
+      \def\pgfpie at late@afternumber{\def\pgfpie at afternumber{\%}}%
+    }{%
+      \def\pgfpie at late@afternumber{}%
+    }%
+  },
   rotate/.store in=\pgfpie at 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 at ifx\pgfpie at sum\pgfpie at sum@c{%
-    \pgfqkeys{/pgfpie}{after number=\%}%
-    \pgfqkeys{/pgfpie}{#1}%
-  }{}%
+  \pgfpie at late@afternumber
 
   % legend or not
   \pgfpie at ifx\pgfpie at text\pgfpie at text@legend{%
@@ -280,6 +291,7 @@
     \pgfpie at iflegend{%
       \pgfpie at legend{#2}%
   }{}}%
+  \endscope
 }
 
 \def\pgfpie at pie@square#1{%



More information about the tex-live-commits mailing list.