texlive[41961] Master/texmf-dist: animate (31aug16)

commits+karl at tug.org commits+karl at tug.org
Thu Sep 1 00:45:09 CEST 2016


Revision: 41961
          http://tug.org/svn/texlive?view=revision&revision=41961
Author:   karl
Date:     2016-09-01 00:45:09 +0200 (Thu, 01 Sep 2016)
Log Message:
-----------
animate (31aug16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
    trunk/Master/texmf-dist/doc/latex/animate/README
    trunk/Master/texmf-dist/doc/latex/animate/animate.pdf
    trunk/Master/texmf-dist/source/latex/animate/animate.tex
    trunk/Master/texmf-dist/tex/latex/animate/animate.sty

Modified: trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2016-08-31 22:44:27 UTC (rev 41960)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2016-08-31 22:45:09 UTC (rev 41961)
@@ -1,3 +1,6 @@
+2016-08-31
+	* fix: missing variable declarations in JavaScript part
+
 2016-08-26
 	* fix: adjust JavaScript part for compatibility with current PDF-XChange
 	Editor

Modified: trunk/Master/texmf-dist/doc/latex/animate/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/README	2016-08-31 22:44:27 UTC (rev 41960)
+++ trunk/Master/texmf-dist/doc/latex/animate/README	2016-08-31 22:45:09 UTC (rev 41961)
@@ -18,7 +18,7 @@
     -> ps2pdf (Ghostscript)/Distiller and (Xe)LaTeX -> (x)dvipdfmx.
 
     The resulting PDF with animations can be viewed in Acrobat Reader (except on
-    mobile devices), in PDF-XChange Viewer and in Foxit Reader.
+    mobile devices), in PDF-XChange and in Foxit Reader.
 
     Note, this file only gives a summary of usage and available package and
     command options. Please refer to the documentation `animate.pdf' for details
@@ -77,7 +77,7 @@
     pdfTeX, version >= 1.20
     Ghostscript, version >= 9.15 or Adobe Distiller
     dvipdfmx, version >= 20080607
-    Acrobat Reader (version >= 7), PDF-XChange Viewer, Foxit Reader
+    Acrobat Reader (version >= 7), PDF-XChange, Foxit Reader
 
 
 Installation:

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

Modified: trunk/Master/texmf-dist/source/latex/animate/animate.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/animate/animate.tex	2016-08-31 22:44:27 UTC (rev 41960)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex	2016-08-31 22:45:09 UTC (rev 41961)
@@ -113,7 +113,7 @@
 
 Package `animate' supports the usual PDF making workflows, i.\,e. pdf\LaTeX{}, Lua\LaTeX{}, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+.
 
-PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), in PDF-XChange Viewer (with option `\verb+method=widget+' or `\verb+method=ocg+') and in Foxit Reader.
+PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), PDF-XChange and Foxit Reader.
 
 \section{Requirements}
 \begin{trivlist}

Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2016-08-31 22:44:27 UTC (rev 41960)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2016-08-31 22:45:09 UTC (rev 41961)
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim at version{2016/08/26}
+\def\@anim at version{2016/08/31}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF animations from files and inline graphics]
 
@@ -2935,21 +2935,21 @@
 \def\@anim@@pojscript#1{% #1: @anim at num
 %  console.show();%
 %  console.clear();%
-  curdoc=this;%
+  var curdoc=this,a#1_idx\if at anim@step\else,a#1_int\fi;%
   if(typeof a#1==='undefined'){% initialize animation
-    a#1={};%
+    var a#1={};%
     %takes references to frame ocgs/Field objects belonging to the current
     %animation
-    a#1_fr=new Array();%
+    var a#1_fr=new Array();%
     %initialize fr properties
     \ifcase\@anim at method %icon based
-      a#1_wid=this.getField('anm#1');%reference to interactive widget
+      var a#1_wid=this.getField('anm#1');%reference to interactive widget
       for(i=0;i<=\@anim at maxframe;i++){%
         a#1_fr[i]=this.getField('#1.'+i).buttonGetIcon();%
       }%
       \ifnum\@anim at poster=\@anim at mtwo
         if(typeof blnk==='undefined'){% blank poster
-          blnk=this.getField('0000').buttonGetIcon();%
+          var blnk=this.getField('0000').buttonGetIcon();%
         }%
       \fi%
     \or %widget based
@@ -2971,31 +2971,32 @@
       }%
     \fi%
     \if at anim@controls\if at anim@step\else
-      a#1_btnPauseLeft=this.getField('#1.PauseLeft');%
-      a#1_btnPlayLeft=this.getField('#1.PlayLeft');%
-      a#1_btnPauseRight=this.getField('#1.PauseRight');%
-      a#1_btnPlayRight=this.getField('#1.PlayRight');%
+      var a#1_btnPauseLeft=this.getField('#1.PauseLeft');%
+      var a#1_btnPlayLeft=this.getField('#1.PlayLeft');%
+      var a#1_btnPauseRight=this.getField('#1.PauseRight');%
+      var a#1_btnPlayRight=this.getField('#1.PlayRight');%
     \fi\fi%
     %playing state and direction
-    \if at anim@step
-      \if at anim@palindrome a#1_playsRight=true;\fi%
+    \if at anim@step%
+      \if at anim@palindrome var a#1_playsRight=true;\fi%
     \else
       a#1_playsRight=true;%
-    \fi%
-    a#1_isPaused=false;%
+    \fi
+    var a#1_isPaused=false;%
     \if at anim@step\else
-      a#1_playing=false;%
+      var a#1_playing=false;%
       \if at anim@pauseframes
         %this array takes the frame numbers at which to pause playback
-        a#1_pauseAt=new Array();%
+        var a#1_pauseAt=new Array();%
         \@anim at pauseat%
       \fi%
       \if at anim@chfps
         %arrays that take frame numbers (array index) and fps values
-        a#1_nFpsAt=new Array(\@anim at nfpsat);%
+        var a#1_nFpsAt=new Array(\@anim at nfpsat);%
       \fi
-      a#1_fps=\@anim at fps==0?1e-6:\@anim at fps;a#1_sm=1;%
-      a#1_setFps=function(f){%
+      var a#1_fps=\@anim at fps==0?1e-6:\@anim at fps;%
+      var a#1_sm=1;%
+      var a#1_setFps=function(f){%
         a#1_fps=f==0?1e-6:f;%
         if(a#1_playing){%
           if(a#1_playsRight){a#1_playRight();}else{a#1_playLeft();}%
@@ -3004,11 +3005,11 @@
     \fi%
     \if at anim@usrjs
       %array to take frame numbers (array index) and user provided JavaScript
-      a#1_usrJSat=new Array();%
+      var a#1_usrJSat=new Array();%
       \@anim at usrjsat%
     \fi%
     %actions
-    a#1_seekFrame=function(f){%
+    var a#1_seekFrame=function(f){%
       \ifnum\@anim at poster=\@anim at mtwo
         if(f<-1){%
           \ifcase\@anim at method %icon based
@@ -3029,8 +3030,8 @@
       a#1_idx=f;%
       \if at anim@usrjs
         if(a#1_usrJSat[f]){%
-          var cmd='try{a#1_usrJSat['+f+']();}catch(e){console.println(e);}';%
-          var ret=app.setTimeOut(cmd,1);%
+          cmd='try{a#1_usrJSat['+f+']();}catch(e){console.println(e);}';%
+          ret=app.setTimeOut(cmd,1);%
         }%
       \fi%
       \ifcase\@anim at method %icon based
@@ -3056,7 +3057,7 @@
       \if at anim@step\else\if at anim@meas a#1_frcnt++;\fi\fi%
       return 0;%
     };%
-    a#1_stopFirst=function(){%
+    var a#1_stopFirst=function(){%
       \if at anim@step
         a#1_isPaused=false;% stop
       \else
@@ -3064,7 +3065,7 @@
       \fi
       a#1_seekFrame(0);%
     };%
-    a#1_stopLast=function(){%
+    var a#1_stopLast=function(){%
       \if at anim@step
         a#1_isPaused=false;% stop
       \else
@@ -3072,7 +3073,7 @@
       \fi
       a#1_seekFrame(\@anim at maxframe);%
     };%
-    a#1_gotoNext=function(){%
+    var a#1_gotoNext=function(){%
       if(a#1_seekFrame(a#1_idx+1)<0){%
         \if at anim@step\else\if at anim@meas a#1_stopMeas();\fi\fi%
         \if at anim@palindrome%
@@ -3107,7 +3108,7 @@
         \fi%
       \fi%
     };%
-    a#1_gotoPrev=function(){%
+    var a#1_gotoPrev=function(){%
       if(a#1_seekFrame(a#1_idx-1)<0){%
         \if at anim@step\else\if at anim@meas a#1_stopMeas();\fi\fi%
         \if at anim@palindrome%
@@ -3142,7 +3143,7 @@
       \fi%
     };%
     \if at anim@step\else
-      a#1_pause=function(stop){%
+      var a#1_pause=function(stop){%
         try{app.clearInterval(a#1_int);}catch(e){}%
         a#1_playing=false;%
         a#1_isPaused=!stop;%
@@ -3154,9 +3155,9 @@
           curdoc.dirty=false;%
         \fi%
       };%
-      a#1_playRight=function(){%
+      var a#1_playRight=function(){%
         \if at anim@meas a#1_startMeas();\fi
-        try{var tmp_int=app.setInterval('a#1_gotoNext()',%
+        try{tmp_int=app.setInterval('a#1_gotoNext()',%
           1000/a#1_fps/a#1_sm);}catch(e){}%
         try{app.clearInterval(a#1_int);}catch(e){}%
         a#1_int=tmp_int;%
@@ -3171,9 +3172,9 @@
           curdoc.dirty=false;%
         \fi%
       };%
-      a#1_playLeft=function(){%
+      var a#1_playLeft=function(){%
         \if at anim@meas a#1_startMeas();\fi
-        try{var tmp_int=app.setInterval('a#1_gotoPrev()',%
+        try{tmp_int=app.setInterval('a#1_gotoPrev()',%
           1000/a#1_fps/a#1_sm);}catch(e){}%
         try{app.clearInterval(a#1_int);}catch(e){}%
         a#1_int=tmp_int;%
@@ -3189,15 +3190,15 @@
         \fi%
       };%
       \if at anim@controls
-        a#1_fpsIncr=function(){% speed up animation
+        var a#1_fpsIncr=function(){% speed up animation
           a#1_sm*=1.1;%
           a#1_setFps(a#1_fps);%
         };%
-        a#1_fpsDecr=function(){% slow down animation
+        var a#1_fpsDecr=function(){% slow down animation
           a#1_sm/=1.1;%
           a#1_setFps(a#1_fps);%
         };%
-        a#1_fpsReset=function(){% reset to default speed
+        var a#1_fpsReset=function(){% reset to default speed
           a#1_sm=1;%
           a#1_setFps(a#1_fps);%
         };%
@@ -3204,14 +3205,14 @@
       \fi%
       \if at anim@meas
         spc=String.fromCharCode(32);%
-        a#1_frcnt=1;% frame counter for speed measurements
-        a#1_msStart=0;% takes start time (in millisecs)
-        a#1_msEnd=0;% takes end time (in millisecs)
-        a#1_startMeas=function(){%
+        var a#1_frcnt,% frame counter for speed measurements
+            a#1_msStart,% takes start time (in millisecs)
+            a#1_msEnd;% takes end time (in millisecs)
+        var a#1_startMeas=function(){%
           a#1_frcnt=1;% reset frame counter
           a#1_msStart=(new Date()).getTime();%
         };%
-        a#1_stopMeas=function(){%
+        var a#1_stopMeas=function(){%
           a#1_msEnd=(new Date()).getTime();%
           console.show();console.println(%
             'av.'+spc+'frame'+spc+'rate:'+spc+%
@@ -3221,28 +3222,28 @@
       \fi%
     \fi%
     \if at anim@step
-      a#1_stepBwd=function(){%
+      var a#1_stepBwd=function(){%
         a#1_seekFrame(a#1_idx-1);%
         a#1_isPaused=true;%
       };%
-      a#1_stepFwd=function(){%
+      var a#1_stepFwd=function(){%
         a#1_seekFrame(a#1_idx+1);%
         a#1_isPaused=true;%
       };%
     \else
-      a#1_stepBwd=function(){if(!a#1_playing){%
+      var a#1_stepBwd=function(){if(!a#1_playing){%
         a#1_seekFrame(a#1_idx-1);%
         a#1_isPaused=true;%
       }};%
-      a#1_stepFwd=function(){if(!a#1_playing){%
+      var a#1_stepFwd=function(){if(!a#1_playing){%
         a#1_seekFrame(a#1_idx+1);%
         a#1_isPaused=true;%
       }};%
-      a#1_playBwd=function(){%
+      var a#1_playBwd=function(){%
         if(a#1_idx==0||!a#1_isPaused){a#1_stopLast();}%
         a#1_playLeft();%
       };%
-      a#1_playFwd=function(){%
+      var a#1_playFwd=function(){%
         if(a#1_idx==\@anim at maxframe||!a#1_isPaused){a#1_stopFirst();}%
         a#1_playRight();%
       };%
@@ -3249,7 +3250,7 @@
     \fi%
     %animation API for labelled anims
     \ifx\empty\@anim at label\empty\else
-      if(typeof anim==='undefined'){anim=new Array();}%
+      if(typeof anim==='undefined'){var anim=new Array();}%
       if(typeof anim['\@anim at label']==='undefined'){%
         anim['\@anim at label']={%
           \if at anim@step\else
@@ -3287,7 +3288,7 @@
         };%
       }%
     \fi%
-    \ifnum\@anim at method>\z@ a#1_on=0;\fi% just initialize a#1_on
+    \ifnum\@anim at method>\z@ var a#1_on=0;\fi%initialize a#1_on here!!!
     \ifnum\@anim at poster=\@anim at mtwo %poster=none
       ret=app.setTimeOut('a#1_seekFrame(-2)',1);%
     \fi%



More information about the tex-live-commits mailing list