summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pgfplots
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-05 23:09:50 +0000
committerKarl Berry <karl@freefriends.org>2017-06-05 23:09:50 +0000
commit327cd87d4221068ab573a3504626efee4617a231 (patch)
tree38428d40c974abbc49cc1a156e8c6eb1f0c7f20c /Master/texmf-dist/tex/latex/pgfplots
parent3b20e2fc53faaae132472dfb561107e62079a95e (diff)
pgfplots (5jun17)
git-svn-id: svn://tug.org/texlive/trunk@44469 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pgfplots')
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex92
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty13
2 files changed, 57 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex b/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex
index fb0e9a0812c..1f93500e02f 100644
--- a/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex
+++ b/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex
@@ -9,12 +9,12 @@
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
-%
+%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
-%
+%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
@@ -115,7 +115,7 @@
annot/xaxis/.initial=,
annot/yaxis/.initial=,
annot/zaxis/.initial=,
- % format:
+ % format:
% [<plot1coords>, <plot2coords>,...,<plotncoords>]
% with <ploticoords> = [<coord>,<coord>,....,<coord>]
% and <coord> = [ <x>, <y>, "text" ]
@@ -173,7 +173,7 @@
% {\uccode`c=`\%\uppercase{\iwvo{\string\obeyspaces\string\obeylines\string\global\string\let\string^\string^M=\string\jsR c}}}
% {\escapechar=-1 \lccode`C=`\%\lowercase{\iwvo{\string\\catcode`\string\\"=12C}}}
% }
-%--------------------------------------------------
+%--------------------------------------------------
% Bugfix to fix incompatibility when '<' and '>' are active (as for
% \usepackage[spanish]{babel}:
@@ -225,14 +225,14 @@
% only normal letters are allowed inside of the argument here.
\begin{insDLJS}[processAnnotatedPlot]{pgfplotsJS}{pgfplots Clickable Plot Code}
/*********************************************************************************
- * function sprintf() - written by Kevin van Zonneveld as part of the php to javascript
+ * function sprintf() - written by Kevin van Zonneveld as part of the php to javascript
* conversion project.
- *
+ *
* More info at: http://kevin.vanzonneveld.net/techblog/article/phpjs_licensing/
- *
+ *
* This is version: 1.33
* php.js is copyright 2008 Kevin van Zonneveld.
- *
+ *
* Portions copyright Michael White (http://crestidg.com), _argos, Jonas
* Raoni Soares Silva (http://www.jsfromhell.com), Legaev Andrey, Ates Goral
* (http://magnetiq.com), Philip Peterson, Martijn Wieringa, Webtoolkit.info
@@ -259,10 +259,10 @@
* Yannoo, baris ozdil, booeyOH, djmix, dptr1988, duncan, echo is bad, gabriel
* paderni, ger, gorthaur, jakes, john (http://www.jd-tech.net), kenneth,
* loonquawl, penutbutterjelly, stensi
- *
+ *
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -270,10 +270,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -281,12 +281,12 @@
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
- */
-// ATTENTION: this method has been masked such that special characters of TeX and javascript
+ */
+// ATTENTION: this method has been masked such that special characters of TeX and javascript
// don't produce problems.
function sprintf( ) {
// Return a formatted string
- //
+ //
// + discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_sprintf/
// + version: 804.1712
// + original by: Ash Searle (http://hexmen.com/blog/)
@@ -469,7 +469,7 @@ function ClickableCoord(canvasx,canvasy, realx,realy, text)
this.realy=realy;
this.text=text;
}
-ClickableCoord.prototype =
+ClickableCoord.prototype =
{
dim : 0,
canvasx : 0,
@@ -515,7 +515,7 @@ ClickableCoord.prototype =
"<body> " + % xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"Acrobat:9.3.2\" xfa:spec=\"2.0.2\">" +
%"<p>"+
"<span>"+ % style="font-size:9.0pt;text-align:left;color:#7E0000;font-weight:normal;font-style:normal;font-family:Helvetica,sans-serif;font-stretch:normal"
- this.text +
+ this.text +
"</span>"+
%"</p>"+
"</body>";
@@ -544,7 +544,7 @@ ClickableCoord.prototype =
canvas.display = display.visible;
else
canvas.display = display.noPrint;
-
+
var mark = docObject.getField( canvas.name + "mark");
if( mark ) {
R = mark.rect;
@@ -589,7 +589,7 @@ PGFPlotsAxis.prototype = {
var collectedPlots = this.collectedPlots;
if( point.dim > 2 )
tmpPt = new ClickableCoord(0,0,0,0,"");
-
+
if( startSearchAt != null && startSearchAt.isSnapToNearestCoord() ) {
startPlot = startSearchAt.sourcePlotIdx;
startCoord= startSearchAt.sourceCoordIdx;
@@ -639,13 +639,13 @@ PGFPlotsAxis.prototype = {
* @param this the axis in which we shall search.
* @param x,y the input canvas coordinates
* @param canvas a pointer to the Drawing object (TextField) whose 'rect' field is the drawing canvas.
- * @param startSearch either null or an instance of ClickableCoord for which isSnapToNearestCoord() returns true.
+ * @param startSearch either null or an instance of ClickableCoord for which isSnapToNearestCoord() returns true.
* If it is not null, the next matching point *after* it will be returned (or null if there is no matching snap--to--nearest coord after it).
* @return an instance of ClickableCoord or null in case the startSearch!=null and there are no further matches.
*/
findClickableCoord : function( x,y, canvas, startSearch )
{
- // Get and modify bounding box. The mouse movement is only accurate up to one point
+ // Get and modify bounding box. The mouse movement is only accurate up to one point
// (mouseX and mouseY are integers), so the bounding box should be an integer as well.
var rect = canvas.rect; // rect = [ mincanvasx mincanvasy maxcanvasx maxcanvasy ]; relative to upper left corner
rect[0] = Math.round(rect[0]);
@@ -662,7 +662,7 @@ PGFPlotsAxis.prototype = {
var minminminy = rect[3] + this.minminmin[1];
var vecx = x - minminminx;
var vecy = y - minminminy;
- var A = [
+ var A = [
[this.xaxis[0], this.yaxis[0]],
[this.xaxis[1], this.yaxis[1]] ];
var b = [ vecx, vecy ];
@@ -689,7 +689,7 @@ PGFPlotsAxis.prototype = {
console.println( "WARNING: startSearch().isSnapToNearestCoord() has been expected!" );
startSearch = null;
}
-
+
var nearestClickableCoord = this.findNearest( point, rect, startSearch );
if( nearestClickableCoord ) {
if( getDist( point.canvasx,point.canvasy, nearestClickableCoord.canvasx, nearestClickableCoord.canvasy ) < this.snapDist ) {
@@ -744,10 +744,10 @@ PGFPlotsAxis.prototype = {
}
// dragging the mouse results in slope computation:
// placeClickableCoord shows the endpoint coords and returns the (transformed) coordinates into tmpArray1 and tmpArray2:
- this.placeClickableCoord(
+ this.placeClickableCoord(
this.findClickableCoord( posOnMouseDownX, posOnMouseDownY, a, null ),
result, displayOpts, tmpArray1 );
- this.placeClickableCoord(
+ this.placeClickableCoord(
this.findClickableCoord( mouseX, mouseY, a, null ),
result2, displayOpts, tmpArray2 );
@@ -805,7 +805,7 @@ PGFPlotsAxis.prototype = {
lastPoint = null; // no search restriction.
}
if( bSearchPoint )
- point = this.findClickableCoord( mouseX, mouseY, a, lastPoint );
+ point = this.findClickableCoord( mouseX, mouseY, a, lastPoint );
lastPoint = point;
@@ -816,7 +816,7 @@ PGFPlotsAxis.prototype = {
return;
}
- this.placeClickableCoord(
+ this.placeClickableCoord(
point,
result, displayOpts, null );
},
@@ -874,8 +874,8 @@ PGFPlotsAxis.prototype = {
// replace the text substring "(xy)" with the actual coordinates:
var coordOff = point.text.indexOf(clickablePatternForXY);
if( coordOff >= 0 ) {
- point.text =
- point.text.substring( 0, coordOff ) +
+ point.text =
+ point.text.substring( 0, coordOff ) +
sprintf( displayOpts.pointFormat, point.realx,point.realy,point.realz) +
point.text.substr( coordOff+clickablePatternForXY.length );
}
@@ -898,7 +898,7 @@ function PGFPlotsTernaryAxis(properties) {
PGFPlotsTernaryAxis.prototype = {
findClickableCoord : function( x,y, canvas, startSearch )
{
- // Get and modify bounding box. The mouse movement is only accurate up to one point
+ // Get and modify bounding box. The mouse movement is only accurate up to one point
// (mouseX and mouseY are integers), so the bounding box should be an integer as well.
var rect = canvas.rect; // rect = [ mincanvasx mincanvasy maxcanvasx maxcanvasy ]; relative to lower left corner
rect[0] = Math.round(rect[0]);
@@ -911,7 +911,7 @@ PGFPlotsTernaryAxis.prototype = {
var X = ( x - rect[0] ) * ternaryScale;
var Y = ( y - rect[3] ) * ternaryScale;
- var realx = 1.15470053837925 * Y; // 2/sqrt(3)
+ var realx = 1.15470053837925 * Y; // 2/sqrt(3)
var realz = X - 0.5 * realx;
var realy = 1 - realx - realz;
@@ -926,7 +926,7 @@ PGFPlotsTernaryAxis.prototype = {
console.println( "WARNING: startSearch().isSnapToNearestCoord() has been expected!" );
startSearch = null;
}
-
+
var nearestClickableCoord = this.findNearest( point, rect, startSearch );
if( nearestClickableCoord ) {
if( getDist( point.canvasx,point.canvasy, nearestClickableCoord.canvasx, nearestClickableCoord.canvasy ) < this.snapDist ) {
@@ -966,7 +966,7 @@ function getDist( x1,y1, x2,y2 ) {
return getVecLen(t1,t2);
}
-function axisMouseDown(formName )
+function axisMouseDown(formName )
{
posOnMouseDownX = mouseX;
posOnMouseDownY = mouseY;
@@ -1016,7 +1016,7 @@ function axisMouseUp(formName, axisAnnotObj, displayOpts)
% }
% }
% hideClickableTextfields();
-%--------------------------------------------------
+%--------------------------------------------------
\pgfkeysdef{/pgfplots/annot/xy pattern}{\pgfplots@clickable@xypat@error}%
@@ -1150,7 +1150,7 @@ function axisMouseUp(formName, axisAnnotObj, displayOpts)
{{
axisType: "\pgfkeysvalueof{/pgfplots/axis type}",
dim: \pgfkeysvalueof{/pgfplots/annot/dim},
- xmin: \pgfkeysvalueof{/pgfplots/annot/xmin},
+ xmin: \pgfkeysvalueof{/pgfplots/annot/xmin},
xmax: \pgfkeysvalueof{/pgfplots/annot/xmax},
ymin: \pgfkeysvalueof{/pgfplots/annot/ymin},
ymax: \pgfkeysvalueof{/pgfplots/annot/ymax},
@@ -1204,7 +1204,7 @@ function axisMouseUp(formName, axisAnnotObj, displayOpts)
% This thing is invoked from within pgfplots. It prepares and invokes
% \pgfplotsclickablecreate.
-%
+%
\def\pgfplots@create@clickable@plotarea@hook{%
\ifpgfplots@clickable
\begingroup
@@ -1325,16 +1325,16 @@ function axisMouseUp(formName, axisAnnotObj, displayOpts)
% \PushButton[name=#3,borderwidth=0,bordersep=0,
% onclick={processAnnotatedPlot("#3", #4, #5);}]{\vbox to #2{\hsize=#1\vfill\hfill}}%
% \TextField[name=#3-result,hidden=true]{}%
- %--------------------------------------------------
+ %--------------------------------------------------
%
- %--------------------------------------------------
+ %--------------------------------------------------
% eforms.sty implementation:
% it allows more customization.
- %--------------------------------------------------
+ %--------------------------------------------------
%
% Hier kommen Annotation Directories zum Zuge!
% -> siehe Annotations in pdf reference
- \def\pushButtonDefaults{
+ \def\pushButtonDefaults{
\W{0}% border width
\Border{0 0 0}%
}%
@@ -1352,8 +1352,8 @@ function axisMouseUp(formName, axisAnnotObj, displayOpts)
\AA{
% /U = "mouse UP"
% /D = "mouse DOWN"
- /U << /S/JavaScript/JS(axisMouseUp("#3", #4, #5);) >>
- /D << /S/JavaScript/JS(axisMouseDown("#3");) >>
+ /U << /S/JavaScript/JS(axisMouseUp("#3", #4, #5);) >>
+ /D << /S/JavaScript/JS(axisMouseDown("#3");) >>
}%
]
{#3}
@@ -1370,16 +1370,16 @@ function axisMouseUp(formName, axisAnnotObj, displayOpts)
% /Subtype /Line
% /Open /false
% /NM (#3-line)
- % /C
- % /CA
+ % /C
+ % /CA
% /Subj ()
% /Contents ()
% /L [0 0 0 0]
% /LE [/None /OpenArrow] % PDF 1.4
% % /Ff 194
% }}%
- %--------------------------------------------------
- %
+ %--------------------------------------------------
+ %
%
%\setLinkBbox[%
% \Border{}%
diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
index 6a0874f0bf9..ffcbc45cf1e 100644
--- a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
+++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
@@ -83,11 +83,20 @@
\expandafter\pgfutil@secondoftwo
\fi
}
+
+\gdef\pgfplots@glob@TMPa{}%
\pgfplotsutil@IfUndefined{directlua}{}{%
- % I need \newcatcodetable
- \RequirePackage{luatexbase}%
+ \pgfplotsutil@IfUndefined{newcatcodetable}{%
+ % I need \newcatcodetable
+ \gdef\pgfplots@glob@TMPa{\RequirePackage{luatexbase}}%
+ }
}%
+\ifx\pgfplots@glob@TMPa\pgfutil@empty
+\else
+ \expandafter\pgfplots@glob@TMPa
+\fi
+
\def\pgfplots@texdist@protect{\protect}%
\input pgfplots.code.tex