diff options
author | Karl Berry <karl@freefriends.org> | 2014-11-27 23:13:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-11-27 23:13:12 +0000 |
commit | 1a1408f472bf9441bdfb843abe54322dcf13ec31 (patch) | |
tree | 932c45b5eab5ea8b566338d640e71832a8d8b006 | |
parent | e230e4df26ca959893b28b41dc5e4f189b7d5d7c (diff) |
animate (27nov14)
git-svn-id: svn://tug.org/texlive/trunk@35674 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/animate/ChangeLog | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/animate/animate.pdf | bin | 3728405 -> 3729164 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/animate/animate.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/animate/animate.sty | 45 |
4 files changed, 40 insertions, 13 deletions
diff --git a/Master/texmf-dist/doc/latex/animate/ChangeLog b/Master/texmf-dist/doc/latex/animate/ChangeLog index da057819230..0d1ceccf40e 100644 --- a/Master/texmf-dist/doc/latex/animate/ChangeLog +++ b/Master/texmf-dist/doc/latex/animate/ChangeLog @@ -1,3 +1,7 @@ +2014-11-27 + * Fix: Animations with a particular combination of command options + (poster=last, loop=false) did not play when clicked. + 2014-11-25 * New: In addition to `first', `last' and `none', the `poster' option also takes an integer number to specify the default poster frame. diff --git a/Master/texmf-dist/doc/latex/animate/animate.pdf b/Master/texmf-dist/doc/latex/animate/animate.pdf Binary files differindex 12f10863d3c..f14f730b9b0 100644 --- a/Master/texmf-dist/doc/latex/animate/animate.pdf +++ b/Master/texmf-dist/doc/latex/animate/animate.pdf diff --git a/Master/texmf-dist/doc/latex/animate/animate.tex b/Master/texmf-dist/doc/latex/animate/animate.tex index 998d666028c..aae75b95f3a 100644 --- a/Master/texmf-dist/doc/latex/animate/animate.tex +++ b/Master/texmf-dist/doc/latex/animate/animate.tex @@ -366,7 +366,7 @@ The letter `\verb+c+', if put into \verb+<transparencies>+, clears an animation \myparagraph*{Timeline example with a single animation stack} Table~\ref{tab:single} is an example of a single-stack animation. It lists the contents of a timeline file together with the resulting stack of transparencies. Note how the stack is strictly built from the bottom up as transparency specifications are read from left to right and line by line from the timeline file. In frame No. 4, the stack is first cleared before new transparencies are deposited on it. Also note that the stack is viewed from above and transparencies in higher stack position overprint the lower ones. -\begin{table}[hb]\centering +\begin{table}[t]\centering \caption{Timeline example of a single-stack animation}\label{tab:single} \begin{tabular}[t]{c|l|c}\hline frame No. & timeline file & transparency stack\\\hline\hline @@ -388,7 +388,7 @@ Due to the stack-like nature of the animation, the position of a transparency sp The layer concept is best illustrated by an example. In the timeline of Table~\ref{tab:multi}, transparencies are grouped into two sub-stacks only. One is reserved for the background images, transparencies No. 0 \& 1, to be exchanged in frame No. 3, as well as for two other transparencies, No. 7 \& 8, to be interspersed in frame No. 1. A second sub-stack takes the foreground objects that are successively added to the scene. The dotted lines in the third column of the table just mark the border between the two sub-stacks. In frame No. 3, `\verb+c+' first clears the bottom sub-stack before the new background image is inserted. (Instead, `\verb+x3+' could have been used with transparency No. 0 in frame No. 0.) As can be seen in the specifications of frames No. 2 \& 4, sub-stacks need not be explicitly populated; the leading semicolons just ensure the proper assignment of transparencies to animation sub-stacks. -\begin{table}[ht]\centering +\begin{table}[t]\centering \caption{Timeline example with two sub-stacks}\label{tab:multi} \begin{tabular}[t]{c|l|c}\hline frame No. & timeline file & transparency stack\\\hline\hline diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty index f53bf7a190b..4a74ebf8010 100644 --- a/Master/texmf-dist/tex/latex/animate/animate.sty +++ b/Master/texmf-dist/tex/latex/animate/animate.sty @@ -13,7 +13,7 @@ \NeedsTeXFormat{LaTeX2e} -\def\@anim@version{2014/11/25} +\def\@anim@version{2014/11/27} \ProvidesPackage{animate} [\@anim@version\space PDF animations from files and inline graphics] @@ -2994,7 +2994,11 @@ a#1.btnPlayRight=this.getField('#1.PlayRight');% \fi\fi% %playing state and direction - \if@anim@morejs a#1.playsRight=true;\fi% + \if@anim@step + \if@anim@palindrome a#1.playsRight=true;\fi% + \else% + \if@anim@morejs a#1.playsRight=true;\fi% + \fi% a#1.isPaused=false;% \if@anim@step\else a#1.playing=false;% @@ -3257,15 +3261,16 @@ a#1.isPaused=true;% }};% a#1.playBwd=function(){% - if(a#1.idx==0){a#1.stopLast();}% + if(a#1.idx==0||!a#1.isPaused){a#1.stopLast();}% a#1.playLeft();% };% a#1.playFwd=function(){% - if(a#1.idx==\@anim@maxframe){a#1.stopFirst();}% + if(a#1.idx==\@anim@maxframe||!a#1.isPaused){a#1.stopFirst();}% a#1.playRight();% };% \fi% \fi% + %animation API for labelled anims \ifx\empty\@anim@label\empty\else if(typeof anim==='undefined'){anim=new Array();}% if(typeof anim['\@anim@label']==='undefined'){% @@ -3282,8 +3287,8 @@ }else{a#1.setFps(f);}% },% get dt(){return 1000/(1e-6+a#1.fps)/a#1.sm;},% + get playsFwd(){return a#1.playsRight;},% \fi - get playsFwd(){return a#1.playsRight;},% get numFrames(){return \@anim@frames;},% get frameNum(){return a#1.idx;},% set frameNum(f){% @@ -3337,14 +3342,17 @@ \def\@anim@otherjscript#1{% \xdef\@anim@otherjscriptkey{% /PC <</S/JavaScript/JS (% PageClose - \if@anim@step\else + \if@anim@step% + \if@anim@palindrome a#1.playsRight=true;\fi% + \else if(a#1.playing){ \if@anim@autopause a#1.pause();% \else a#1.pause(true);% stop - \fi + \fi% }% + \if@anim@morejs if(!a#1.isPaused)a#1.playsRight=true;\fi% \fi %re-display poster frame if(!a#1.isPaused){% i.e. if stopped @@ -3387,10 +3395,25 @@ }% \fi a#1.isPaused=true;% - \else% - \if@anim@morejs - if(a#1.playsRight){a#1.playRight();}else{a#1.playLeft();}% - \else + \else + if(!a#1.isPaused)a#1.stopFirst();% + \if@anim@morejs% + \if@anim@palindrome + if(a#1.idx==0)a#1.playsRight=true;% + if(a#1.idx==\@anim@maxframe)a#1.playsRight=false;% + \else + if(a#1.idx==\@anim@maxframe&&a#1.playsRight)a#1.stopFirst();% + if(a#1.idx==0&&!a#1.playsRight)a#1.stopLast();% + \fi + if(a#1.playsRight){% + a#1.playRight();% + }else{% + a#1.playLeft();% + }% + \else% + \if@anim@loop\else + if(a#1.idx==\@anim@maxframe){a#1.stopFirst();}% + \fi a#1.playRight();% \fi% \fi% |