texlive[42909] Master/texmf-dist: animate (9jan17)
commits+karl at tug.org
commits+karl at tug.org
Mon Jan 9 23:07:26 CET 2017
Revision: 42909
http://tug.org/svn/texlive?view=revision&revision=42909
Author: karl
Date: 2017-01-09 23:07:25 +0100 (Mon, 09 Jan 2017)
Log Message:
-----------
animate (9jan17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
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 2017-01-09 22:07:10 UTC (rev 42908)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog 2017-01-09 22:07:25 UTC (rev 42909)
@@ -1,3 +1,7 @@
+2017-01-09
+ * fix: wrong orientation of animated content on landscape pages
+ (pkgs `lscape'/`pdflascape')
+
2016-09-07
* fix: adjust JavaScript part for compatibility with Foxit Reader
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 2017-01-09 22:07:10 UTC (rev 42908)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex 2017-01-09 22:07:25 UTC (rev 42909)
@@ -111,7 +111,7 @@
\section{Introduction}
This package provides an interface to create PDFs with animated content from sets of graphics or image files, from inline graphics, such as \LaTeX-picture, PSTricks or pgf/TikZ generated pictures, or just from typeset text. Unlike standard movie/video formats, package `animate' allows for animating vector graphics. The result is roughly similar to the SWF (Flash) format, although not as space-efficient.
-The user interacts with the animation either through optional animation controls or by using the mouse. Pressing the mouse button over the animation widget immediately pauses a playing animation and releasing it resumes playback. Pressing the shift-key at the same time reverses the playback direction.
+The user interacts with the animation through optional animation controls or using the mouse like so: Pressing the mouse button over the animation widget immediately pauses a playing animation and releasing it resumes playback. Pressing the shift-key at the same time reverses the playback direction. Keeping the mouse button pressed while moving the mouse pointer off the animation widget permanently pauses playback.
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+.
@@ -235,7 +235,7 @@
\begin{verbatim}
label=<label text>
\end{verbatim}
-The animation is given a label, \verb+<label text>+, which should be unique. Labelling an animation enables its JavaScript programming interface by defining \verb+anim['<label text>']+, which is a JavaScript reference to the animation object. The animation object provides a number of properties and methods that can be used for controlling the animation playback from within user defined JavaScript. For details, see Sect.~\ref{sect:api}.
+The animation is given a label, \verb+<label text>+, which must be unique. Labelling an animation enables its JavaScript programming interface by defining \verb+anim['<label text>']+, which is a JavaScript reference to the animation object. The animation object provides a number of properties and methods that can be used for controlling the animation playback from within user defined JavaScript. For details, see Sect.~\ref{sect:api}.
\begin{verbatim}
type=[<file ext>]
\end{verbatim}
Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty 2017-01-09 22:07:10 UTC (rev 42908)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty 2017-01-09 22:07:25 UTC (rev 42909)
@@ -13,7 +13,7 @@
\NeedsTeXFormat{LaTeX2e}
-\def\@anim at version{2016/09/07}
+\def\@anim at version{2017/01/09}
\ProvidesPackage{animate}
[\@anim at version\space PDF animations from files and inline graphics]
@@ -34,7 +34,7 @@
\RequirePackage{ifdraft}
\RequirePackage{calc}
\RequirePackage{atenddvi}%to really get certain \specials into the dvi
-\RequirePackage{graphics}%\scalebox, \resizebox
+\RequirePackage{graphics}%\scalebox, \resizebox, \rotatebox
%driver options (the only package options we process immediately)
\newboolean{@anim at dvips}
@@ -177,7 +177,7 @@
\else
\ifcsname mdfivesum\endcsname
\def\@anim at pdfmdfivesum#1{\mdfivesum file {#1}}
- \else
+ \else
\def\@anim at pdfmdfivesum#1{#1}
\fi
\fi
@@ -237,6 +237,12 @@
\setboolean{@anim at grxloaded}{false}
\AtBeginDocument{%
\@ifpackageloaded{graphicx}{\setboolean{@anim at grxloaded}{true}}{}%
+ \gdef\@anim at lscape{}%
+ \gdef\@anim@@lscape{:ls}%
+ \ifdefined\landscape%
+ \g at addto@macro{\landscape}{\gdef\@anim at lscape{:ls}}%
+ \g at addto@macro{\endlandscape}{\gdef\@anim at lscape{}}%
+ \fi%
}
% true if any of `autoplay' or `autoresume' options is set
@@ -365,7 +371,7 @@
\vrule width \z@ height \ht#3 depth \dp#3\hss}%
\@anim at scale{\@anim at measbox}%
\else%
- \def\@anim at needresize{0}%
+ \def\@anim at needresize{0}%
%test if natural dimensions of the current frame differ from those
%of the 0th frame
\ifdim\wd#3=\@anim at zframewd\else\def\@anim at needresize{1}\fi%
@@ -433,6 +439,13 @@
\expandafter\@anim at insertfrmcontent\@anim at tmpvar\@nil%
\hss%
}%
+ %inside a `landscape' environment together with the icon and widget methods,
+ %the frame content needs to be rotated counter-clockwise by 90 deg
+ \ifnum\@anim at method>\@ne\else%
+ \ifx\@anim at lscape\@anim@@lscape%
+ \global\setbox\@anim at box=\hbox{\rotatebox{90}{\box\@anim at box}}%
+ \fi%
+ \fi%
\ifcase\@anim at method% icon based
\@anim at xform{0}{1}{\@anim at box}%
%initial visibility
@@ -722,17 +735,41 @@
stroke
}
\def\@anim at makebuttons#1{% #1: @anim at num
- \@anim at xbutton{EndLeft}{[-1 0 0 1 15 0] concat \@anim at btnend}{#1}%
- \@anim at xbutton{EndRight}{\@anim at btnend}{#1}%
- \@anim at xbutton{Minus}{\@anim at btnminus}{#1}%
- \@anim at xbutton{PauseLeft}{[-1 0 0 1 15 0] concat \@anim at btnpause}{#1}%
- \@anim at xbutton{PauseRight}{\@anim at btnpause}{#1}%
- \@anim at xbutton{PlayLeft}{[-1 0 0 1 15 0] concat \@anim at btnplay}{#1}%
- \@anim at xbutton{PlayRight}{\@anim at btnplay}{#1}%
+ \@anim at xbutton{EndLeft}{%
+ [-1 0 0 1 15 0] concat
+ \ifx\@anim at lscape\@anim@@lscape [0 -1 -1 0 15 15] concat \fi%
+ \@anim at btnend}{#1}%
+ \@anim at xbutton{EndRight}{%
+ \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+ \@anim at btnend}{#1}%
+ \@anim at xbutton{Minus}{%
+ \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+ \@anim at btnminus}{#1}%
+ \@anim at xbutton{PauseLeft}{%
+ [-1 0 0 1 15 0] concat
+ \ifx\@anim at lscape\@anim@@lscape [0 -1 -1 0 15 15] concat \fi%
+ \@anim at btnpause}{#1}%
+ \@anim at xbutton{PauseRight}{%
+ \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+ \@anim at btnpause}{#1}%
+ \@anim at xbutton{PlayLeft}{%
+ [-1 0 0 1 15 0] concat
+ \ifx\@anim at lscape\@anim@@lscape [0 -1 -1 0 15 15] concat \fi%
+ \@anim at btnplay}{#1}%
+ \@anim at xbutton{PlayRight}{%
+ \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+ \@anim at btnplay}{#1}%
\@anim at xbutton{Plus}{\@anim at btnplus}{#1}%
- \@anim at xbutton{Reset}{\@anim at btnreset}{#1}%
- \@anim at xbutton{StepLeft}{[-1 0 0 1 15 0] concat \@anim at btnstep}{#1}%
- \@anim at xbutton{StepRight}{\@anim at btnstep}{#1}%
+ \@anim at xbutton{Reset}{%
+ \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+ \@anim at btnreset}{#1}%
+ \@anim at xbutton{StepLeft}{%
+ [-1 0 0 1 15 0] concat
+ \ifx\@anim at lscape\@anim@@lscape [0 -1 -1 0 15 15] concat \fi%
+ \@anim at btnstep}{#1}%
+ \@anim at xbutton{StepRight}{%
+ \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+ \@anim at btnstep}{#1}%
}
\newcount\@anim at objnum
\def\@anim at xbutton#1#2#3{% #1: name; #2: stroking commands, #3 @anim at num
@@ -940,30 +977,37 @@
\def\@anim at makebuttons#1{%
\@anim at xbutton{EndLeft}{%
q -0.1 0 0 0.1 15 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 -1 -1 0 150 150 cm \fi%
\@anim at btnend\space Q%
}{#1}%
\@anim at xbutton{EndRight}{%
q 0.1 0 0 0.1 0 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 1 -1 0 150 0 cm \fi%
\@anim at btnend\space Q%
}{#1}%
\@anim at xbutton{Minus}{%
q 0.1 0 0 0.1 0 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 1 -1 0 150 0 cm \fi%
\@anim at btnminus\space Q%
}{#1}%
\@anim at xbutton{PauseLeft}{%
q -0.1 0 0 0.1 15 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 -1 -1 0 150 150 cm \fi%
\@anim at btnpause\space Q%
}{#1}%
\@anim at xbutton{PauseRight}{%
q 0.1 0 0 0.1 0 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 1 -1 0 150 0 cm \fi%
\@anim at btnpause\space Q%
}{#1}%
\@anim at xbutton{PlayLeft}{%
q -0.1 0 0 0.1 15 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 -1 -1 0 150 150 cm \fi%
\@anim at btnplay\space Q%
}{#1}%
\@anim at xbutton{PlayRight}{%
q 0.1 0 0 0.1 0 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 1 -1 0 150 0 cm \fi%
\@anim at btnplay\space Q%
}{#1}%
\@anim at xbutton{Plus}{%
@@ -972,14 +1016,17 @@
}{#1}%
\@anim at xbutton{Reset}{%
q 0.1 0 0 0.1 0 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 1 -1 0 150 0 cm \fi%
\@anim at btnreset\space Q%
}{#1}%
\@anim at xbutton{StepLeft}{%
q -0.1 0 0 0.1 15 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 -1 -1 0 150 150 cm \fi%
\@anim at btnstep\space Q%
}{#1}%
\@anim at xbutton{StepRight}{%
q 0.1 0 0 0.1 0 0 cm
+ \ifx\@anim at lscape\@anim@@lscape 0 1 -1 0 150 0 cm \fi%
\@anim at btnstep\space Q%
}{#1}%
}
@@ -1345,9 +1392,10 @@
\if at anim@controls%
%create button faces only once in the current colour combination
\ifcsname
- btncol:\@anim at bgcolour:\@anim at fgcolour\endcsname\else%
+ btncol:\@anim at bgcolour:\@anim at fgcolour\@anim at lscape\endcsname\else%
\@anim at makebuttons{\the\@anim at num}%
- \@anim at newkey{btncol:\@anim at bgcolour:\@anim at fgcolour}{\the\@anim at num}%
+ \@anim at newkey{%
+ btncol:\@anim at bgcolour:\@anim at fgcolour\@anim at lscape}{\the\@anim at num}%
\fi%
\fi%
\xdef\@anim at nfps{#2\space}% current frame rate
@@ -1390,7 +1438,7 @@
\fi%
%insert animation widget & controls
\@anim at insertwidgets{\the\@anim at num}{%
- \@anim at getkeyval{btncol:\@anim at bgcolour:\@anim at fgcolour}}%
+ \@anim at getkeyval{btncol:\@anim at bgcolour:\@anim at fgcolour\@anim at lscape}}%
\@anim at endsanitize%
\fi%
\endgroup%
@@ -1700,9 +1748,10 @@
%create button faces if necessary
\if at anim@controls%
\ifcsname
- btncol:\@anim at bgcolour:\@anim at fgcolour\endcsname\else%
+ btncol:\@anim at bgcolour:\@anim at fgcolour\@anim at lscape\endcsname\else%
\@anim at makebuttons{\the\@anim at num}%
- \@anim at newkey{btncol:\@anim at bgcolour:\@anim at fgcolour}{\the\@anim at num}%
+ \@anim at newkey{%
+ btncol:\@anim at bgcolour:\@anim at fgcolour\@anim at lscape}{\the\@anim at num}%
\fi%
\fi%
\if at anim@step\else%
@@ -1730,7 +1779,7 @@
\if at anim@timeline\@anim at buildtmln{\the\@anim at num}\fi%
%insert animation widget & controls
\@anim at insertwidgets{\the\@anim at num}{%
- \@anim at getkeyval{btncol:\@anim at bgcolour:\@anim at fgcolour}}%
+ \@anim at getkeyval{btncol:\@anim at bgcolour:\@anim at fgcolour\@anim at lscape}}%
\@anim at endsanitize%
% if last frame used as poster, write frame num to aux file
\ifnum\@anim at poster=\@anim at mone\relax%
@@ -3288,7 +3337,6 @@
};%
}%
\fi%
-% \ifnum\@anim at method>\z@ var a#1_on=0;\fi%
%poster=none
\ifnum\@anim at poster=\@anim at mtwo a#1_seekFrame(-2);\fi%
%poster=<num>|first
@@ -3369,13 +3417,13 @@
}else{%
a#1_gotoPrev();%
}%
- }else{%
+ }else{%
if(a#1_idx==\@anim at maxframe){%
a#1_stopFirst();%
}else{%
a#1_gotoNext();%
}%
- }%
+ }%
\fi
a#1_isPaused=true;%
\else
More information about the tex-live-commits
mailing list