summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/sparklines
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/sparklines')
-rw-r--r--Master/texmf-dist/tex/latex/sparklines/sparklines.sty17
1 files changed, 12 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/sparklines/sparklines.sty b/Master/texmf-dist/tex/latex/sparklines/sparklines.sty
index e81202b098c..33eff2183a1 100644
--- a/Master/texmf-dist/tex/latex/sparklines/sparklines.sty
+++ b/Master/texmf-dist/tex/latex/sparklines/sparklines.sty
@@ -1,4 +1,4 @@
-%%% sparklines.sty Version 1.3
+%%% sparklines.sty Version 1.4
%%%
%%% What Are Sparklines?
%%% Sparklines are intense, simple, wordlike graphics (so named by Edward Tufte).
@@ -6,7 +6,7 @@
%%% release of a chapter on sparklines, see www.edwardtufte.com. A PHP
%%% implementation can be found at http://sparkline.sourceforge.net/.
%%%
-%%% Copyright 2005 Andreas Loeffler
+%%% Copyright 2009 Andreas Loeffler
%%% ========================================================================
%%% LICENCE:
%%% This file may be distributed under the terms of the LaTeX Project Public
@@ -16,6 +16,8 @@
%%% al@wacc.de
%%%
%%% MODIFICATION HISTORY:
+%%% Apr 20, 2009
+%%% version 1.4: Alexander Kowalski (Alexander.Kowarik@statistik.gv.at) found an error concerning spark-rectangles
%%% Mar 21, 2007
%%% version 1.3: Dan Luecking (luecking@uark.edu) added user-changeable
%%% parameters, and expanded documentation
@@ -27,7 +29,8 @@
%%% version 1.0: first version of sparklines
\ProvidesPackage{sparklines}
- [2005/01/01 v1.3 Sparklines (see more on sparklines at www.EdwardTufte.com)]
+ [2007/04/20 v1.4 Sparklines (see more on sparklines at www.EdwardTufte.com)]
+ \typeout {Package: `sparklines' 1.4 \space 2007/04/20}
\RequirePackage{pgf}
% We define the colors of two features: the background rectangle and
@@ -67,8 +70,12 @@
% defines sparkrectangle
% Replace hard-coded rgb value with with previously defined color value.
\def\sparkrectangle #1 #2 {%
- {\pgfmoveto{\pgforigin}\color{sparkrectanglecolor}
- \pgfrect[fill]{\pgfxy(0, #1)}{\pgfxy(1, #2)}}}
+ \ifdim #1pt > #2pt
+ \errmessage{The upper corner #2 of rectangle cannot be lower than #1}%
+ \fi
+ {\pgfmoveto{\pgforigin}\color{sparkrectanglecolor}%
+ \pgfrect[fill]{\pgfxy(0, #1)}{\pgfxy(1, #2-#1)}}}%
+
% defines sparkline-plot
% Replace \@shouldIstop hack with equivalent \@ifnextchar code.