summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/sparklines
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-04-20 22:48:50 +0000
committerKarl Berry <karl@freefriends.org>2009-04-20 22:48:50 +0000
commited190dcc699e8dbd39a0f38c26e80270b7e4df92 (patch)
tree0e1fb0ffc68928a805bcb623383f4e4c15921572 /Master/texmf-dist/tex/latex/sparklines
parent81b8390ab51570ef80a5e060c6932aa6647c28ea (diff)
sparklines update (20apr09)
git-svn-id: svn://tug.org/texlive/trunk@12765 c570f23f-e606-0410-a88d-b1316a301751
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.