texlive[43329] Master/texmf-dist: animate (23feb17)

commits+karl at tug.org commits+karl at tug.org
Fri Feb 24 23:17:02 CET 2017


Revision: 43329
          http://tug.org/svn/texlive?view=revision&revision=43329
Author:   karl
Date:     2017-02-24 23:17:02 +0100 (Fri, 24 Feb 2017)
Log Message:
-----------
animate (23feb17)

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	2017-02-24 22:16:06 UTC (rev 43328)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2017-02-24 22:17:02 UTC (rev 43329)
@@ -1,3 +1,6 @@
+2017-02-24
+	* fix: further speed improvement for animating external graphics files
+
 2017-02-22
 	* fix: code for repeated inclusion optimized for speed
 

Modified: trunk/Master/texmf-dist/doc/latex/animate/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/README	2017-02-24 22:16:06 UTC (rev 43328)
+++ trunk/Master/texmf-dist/doc/latex/animate/README	2017-02-24 22:17:02 UTC (rev 43329)
@@ -28,7 +28,7 @@
     embed animated graphics LaTeX pdfLaTeX PSTricks pgf TikZ MetaPost
     LaTeX-picture inline graphics vector graphics animated GIF LaTeX
     dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange
-	Foxit Reader
+    Foxit Reader
 
 
 Usage:
@@ -41,7 +41,8 @@
                        buttonsize=<size>, buttonbg=<colour>, buttonfg=<colour>,
                        loop, palindrome, step,
                        poster[=first | <num> | last | none],
-                       method=icon | widget | ocg, dvipdfmx, xetex
+                       method=icon | widget | ocg, dvipdfmx, xetex,
+                       type=[<file ext>]
 
 
     \animategraphics[<options>]{<frame rate>}{<file basename>}{<first>}{<last>}
@@ -69,13 +70,14 @@
                        method=icon | widget | ocg,
                        every=<number>, bb=<llx> <lly> <urx> <ury>,
                        viewport=<llx> <lly> <urx> <ury>,
-                       trim=<left> <bottom> <right> <top>
+                       trim=<left> <bottom> <right> <top>,
+                       label=<label text>, type=[<file ext>]
 
 
 Requirements:
 
     e-TeX
-    pdfTeX, version >= 1.20
+    pdfTeX, version >= 1.20, or LuaLaTeX, version >= 0.95
     Ghostscript, version >= 9.15 or Adobe Distiller
     dvipdfmx, version >= 20080607
     Acrobat Reader (version >= 7), PDF-XChange, 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-02-24 22:16:06 UTC (rev 43328)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex	2017-02-24 22:17:02 UTC (rev 43329)
@@ -121,7 +121,7 @@
 \section{Requirements}
 \begin{trivlist}
 %\item $\varepsilon$-\TeX
-\item pdf\TeX{}, version $\ge1.20$ or Lua\TeX{} for direct PDF output
+\item pdf\TeX{}, version $\ge1.20$, or Lua\TeX{}, version $\ge0.95$, for direct PDF output
 \item Ghostscript, version $\ge9.15$ or Adobe Distiller for PS to PDF conversion
 \item dvipdfmx, version $\ge20080607$ for DVI to PDF conversion
 \item Acrobat Reader (version $\ge7$), PDF-XChange, Foxit Reader
@@ -168,13 +168,13 @@
 \end{verbatim}
 Except for `\verb+dvipdfmx+' and `\verb+xetex+', the options above are also available (among others) as command options and will be explained shortly. However, if used as package options they have global scope, taking effect on all animations in the document. In turn, command options locally override global settings. Options without an argument are boolean options and can be negated, with the exception of package-only options `\verb+dvipdfmx+' and `\verb+xetex+', by appending `\verb+=false+'.
 
-If PDF is generated via DVI and Postscript by the command sequence \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+, the `graphicx' package is required. \begin{animateinline}[autoplay,loop,nomouse]{1}\strut\emph{Important:}\newframe[3]\end{animateinline} The \verb+dvips+ option `\verb+-Ppdf+' should \emph{not} be set when converting the intermediate DVI into Postscript. If you cannot do without, put `\verb+-D 1200+' \emph{after} `\verb+-Ppdf+' on the command line. Users of \LaTeX-aware text editors with menu-driven toolchain invocation, such as \TeX{}nicCenter, should check the configuration of the \verb+dvips+ call.
+\begin{animateinline}[autoplay,loop,nomouse]{1}\strut\emph{Important:}\newframe[3]\end{animateinline} Option `\verb+-Ppdf+' should \emph{not} be used with \verb+dvips+ when converting DVI to Postscript. If you cannot do without, put `\verb+-D 1200+' \emph{after} `\verb+-Ppdf+' on the command line. Users of \LaTeX-aware text editors with menu-driven toolchain invocation, such as \TeX{}nicCenter, should check the configuration of the \verb+dvips+ call.
 
-\XeLaTeX{} and \verb+dvipdfmx+ require the `graphicx' package to be loaded. While \XeLaTeX{} will be auto-detected (package option `\verb+xetex+' is optional), `animate' and `graphicx' need the package option `\verb+dvipdfmx+' in the case of \verb+dvipdfmx+.
+All workflows require the `graphicx' package to be loaded explicitly. For \verb+dvipdfmx+, `\verb+dvipdfmx+' must be set as a document class option, \verb+\documentclass[dvipdfmx,...]{...}+, because this driver cannot be auto-detected by `animate', `graphicx' and other packages.
 
 Usually, a second \LaTeX{} run is necessary to resolve internally created object references. A warning message will be issued if appropriate.
 
-%\clearpage
+\clearpage
 \section{The user interface}
 Package `animate' provides the command
 \begin{verbatim}
@@ -286,15 +286,15 @@
 \begin{verbatim}
 bb=<llx> <lly> <urx> <ury>
 \end{verbatim}
-(\verb+\animategraphics+ only, requires package `graphicx'.) The four, space separated arguments set the bounding box of the graphics files. Units can be omitted, in which case `bp' (Postscript points) is assumed.
+(\verb+\animategraphics+ only.) The four, space separated arguments set the bounding box of the graphics files. Units can be omitted, in which case `bp' (Postscript points) is assumed.
 \begin{verbatim}
 viewport=<llx> <lly> <urx> <ury>
 \end{verbatim}
-(\verb+\animategraphics+ only, requires package `graphicx'.) This option takes four arguments, just like `\verb+bb+'. However, in this case the values are taken relative to the origin specified by the bounding box in the graphics files.
+(\verb+\animategraphics+ only.) This option takes four arguments, just like `\verb+bb+'. However, in this case the values are taken relative to the origin specified by the bounding box in the graphics files.
 \begin{verbatim}
 trim=<left> <bottom> <right> <top>
 \end{verbatim}
-(\verb+\animategraphics+ only, requires package `graphicx'.) Crops graphics at the edges. The four lengths specify the amount to be removed from or, if negative values have been provided, to be added to each side of the graphics.
+(\verb+\animategraphics+ only.) Crops graphics at the edges. The four lengths specify the amount to be removed from or, if negative values have been provided, to be added to each side of the graphics.
 \begin{verbatim}
 controls
 \end{verbatim}

Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2017-02-24 22:16:06 UTC (rev 43328)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2017-02-24 22:17:02 UTC (rev 43329)
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim at version{2017/02/22}
+\def\@anim at version{2017/02/24}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF animations from files and inline graphics]
 
@@ -122,21 +122,7 @@
   \xdef\@anim at curocg{\ocgbase at last@ocg}%
 }
 
-\ifpdf
-  %load MP to PDF converter
-  \InputIfFileExists{supp-pdf.mkii}{}{%
-  \InputIfFileExists{supp-pdf}{}{%
-    \PackageWarningNoLine{animate}{%
-      Neither of the files `supp-pdf.mkii' and `supp-pdf.tex',%
-      \MessageBreak%
-      which are part of ConTeXt, could be found.%
-      \MessageBreak%
-      Therefore, MetaPost generated PS files cannot%
-      \MessageBreak%
-      be embedded using pdfTeX%
-    }
-  }}
-\else
+\ifpdf\else
   \if at anim@dvipdfmx\else % dvips
     %if geometry package is loaded, execute `\geometry{dvips}' right before
     %  `\begin{document}'; not sure whether needed at all any more
@@ -226,7 +212,7 @@
     \def\@anim at pkgopt{[#1]}%
   }%
   \PackageError{animate}{%
-    Package `#2' has not been loaded yet.\MessageBreak%
+    Package `#2' required.
     Put the line\MessageBreak%
     `\protect\usepackage\@anim at pkgopt{#2}'\MessageBreak%
     to the preamble of your document%
@@ -256,18 +242,6 @@
 \newdimen\@anim at tmpdima %length registers for occasional use
 \newdimen\@anim at tmpdimb
 
-%tests whether file is already known (and embedded), if so it returns identifier
-%of xobj, otherwise returns `!'
-\def\@anim at fileknown#1#2{%#1 file name, #2 page No. (multipage files)
-  %identify file by md5sum
-  \ifcsname file:\@anim at pdfmdfivesum{#1}.#2\endcsname%
-    \@anim at getkeyval{file:\@anim at pdfmdfivesum{#1}.#2}\else!\fi%
-}
-\def\@anim at makefileknown#1#2#3{%
-  %#1 file name, #2 page No. (multipage files), #3 Form XObj ID
-  \@anim at newkey{file:\@anim at pdfmdfivesum{#1}.#2}{#3}%
-}
-
 \def\@anim at firstofthree#1#2#3{#1}
 \def\@anim at secndofthree#1#2#3{#2}
 \def\@anim at thirdofthree#1#2#3{#3}
@@ -277,36 +251,18 @@
 \def\@anim at xformnatdp#1{\expandafter\@anim at thirdofthree#1}
 
 %helper macro that typesets graphics file into savebox
-\ifpdf
-  \def\@anim at filebox#1#2{% #1 filename, #2 page No. for multipage files
-    \ifx\@anim at gropts\@empty%
-      \def\@anim at mps{.mps}%
-      \ifx\@anim at ext\@anim at mps%
-        \global\setbox\@anim at box=\hbox{\convertMPtoPDF{#1}{1}{1}}%
-      \else%
-        \pdfximage page #2 {#1}%
-        \global\setbox\@anim at box=\hbox{\pdfrefximage\pdflastximage}%
-      \fi%
-    \else%
-      \edef\@anim at curfile{[clip\@anim at gropts,page=#2]{#1}}%
-      \global\setbox\@anim at box=\hbox{%
-        \expandafter\includegraphics\@anim at curfile}%
-    \fi%
+\if at anim@dvips % dvips: no multi-page support
+  \def\@anim at filebox#1#2{% pdftex, xetex
+    \edef\@anim at curfile{[clip\@anim at gropts]{#1}}%
+    \global\setbox\@anim at box=\hbox{%
+      \expandafter\includegraphics\@anim at curfile}%
   }
-\else
-  \if at anim@xetex
-    \def\@anim at filebox#1#2{%
-      \edef\@anim at curfile{[clip\@anim at gropts,page=#2]{#1}}%
-      \global\setbox\@anim at box=\hbox{%
-        \expandafter\includegraphics\@anim at curfile}%
-    }
-  \else
-    \def\@anim at filebox#1#2{% #2 ignored
-      \edef\@anim at curfile{[clip\@anim at gropts]{#1}}%
-      \global\setbox\@anim at box=\hbox{%
-        \expandafter\includegraphics\@anim at curfile}%
-    }
-  \fi
+\else %pdfTeX, LuaTeX, dvipdfmx, xetex (multi-page)
+  \def\@anim at filebox#1#2{%
+    \edef\@anim at curfile{[clip\@anim at gropts,page=#2]{#1}}%
+    \global\setbox\@anim at box=\hbox{%
+      \expandafter\includegraphics\@anim at curfile}%
+  }
 \fi
 
 \def\@anim at checkboxsize#1#2{% #1: box number, #2: file
@@ -331,13 +287,14 @@
 %create Form XObject from graphics file
 \def\@anim at ximage#1#2#3#4{%#1:@anim at num, #2:@anim at curframe@zb, #3:filename,
   %#4: page number of multipage file
-  \ifthenelse{\equal{\@anim at fileknown{#3}{#4.\@anim at gropts}}{!}}{%
+  \edef\@anim at fingerprint{file:\@anim at pdfmdfivesum{#3}.#4.\@anim at gropts}%
+  \edef\@anim at curxform{\@anim at getkeyval{\@anim at fingerprint}}%
+  \ifthenelse{\equal{\@anim at curxform}{}}{%
+    % new file.page.graphicx_options
     \@anim at filebox{#3}{#4}% store file in a box
     \@anim at xinline{#1}{#2}{\@anim at box}{!}% delegate Form XObject creation
-    \ifx\@anim at gropts\@empty\if at anim@multipage\message{<#4>}\fi\fi%
-    \@anim at makefileknown{#3}{#4.\@anim at gropts}{\@anim@@lastxform}%
-  }{% file known, re-use existing form xobject
-    \edef\@anim at curxform{\@anim at fileknown{#3}{#4.\@anim at gropts}}%
+    \@anim at newkey{\@anim at fingerprint}{\@anim@@lastxform}%
+  }{% file known, re-using existing form xobject
     \edef\@anim at curndims{\@anim at getkeyval{natdims:\@anim at curxform}}% nat. dims
     \setbox\@anim at box=\hbox to \@anim at xformnatwd{\@anim at curndims}{%
       \vrule width \z@
@@ -346,6 +303,7 @@
     }%
     \@anim at xinline{#1}{#2}{\@anim at box}{\@anim at curxform}%
   }%
+  \message{<a#1,fr#2>}%
 }
 
 %creates Form XObject from box contents
@@ -1298,7 +1256,9 @@
       \fi%
     }%
   \else
-    %no multipage support in dvips and dvipdfmx
+    %no multi-page support in dvips
+    %although dvipdfmx actually has multi-page support, it lacks a way to
+    %determine the total page count which is needed here
     \def\@anim at checkmultipage#1{\setboolean{@anim at multipage}{false}}%
   \fi
 \fi
@@ -1330,21 +1290,12 @@
 \newcommand{\animategraphics}[5][]{%
   \@anim at endsanitize%
   \leavevmode%
-  \ifpdf\else%
-    \if at anim@grxloaded%
-      \if at anim@xetex%
-        \DeclareGraphicsRule{.mps}{eps}{*}{}%
-      \fi%
+  \if at anim@grxloaded\else%
+    \if at anim@dvipdfmx\if at anim@xetex%
+      \@anim at missing{graphicx}\else%
+      \@anim at missing[dvipdfmx]{graphicx}\fi%
     \else%
-      \if at anim@xetex%
-        \@anim at missing[xetex]{graphicx}%
-      \else%
-        \if at anim@dvipdfmx%
-          \@anim at missing[dvipdfmx]{graphicx}%
-        \else%
-          \@anim at missing{graphicx}%
-        \fi%
-      \fi%
+      \@anim at missing{graphicx}%
     \fi%
   \fi%
   \@anim at reset% to default settings
@@ -2647,20 +2598,16 @@
   \ifnum#1<\@ne\relax\gdef\@anim at every{1}\else\gdef\@anim at every{#1}\fi%
 }
 \define at key{anim at user}{bb}{%
-  \if at anim@grxloaded\g at addto@macro\@anim at gropts{, bb=#1}%
-  \else\@anim at missing{graphicx}\fi%
+  \g at addto@macro\@anim at gropts{, bb=#1}%
 }
 \define at key{anim at user}{viewport}{%
-  \if at anim@grxloaded\g at addto@macro\@anim at gropts{, viewport=#1}%
-  \else\@anim at missing{graphicx}\fi%
+  \g at addto@macro\@anim at gropts{, viewport=#1}%
 }
 \define at key{anim at user}{trim}{%
-  \if at anim@grxloaded\g at addto@macro\@anim at gropts{, trim=#1}%
-  \else\@anim at missing{graphicx}\fi%
+  \g at addto@macro\@anim at gropts{, trim=#1}%
 }
 \define at key{anim at user}{angle}{%
-  \if at anim@grxloaded\g at addto@macro\@anim at gropts{, angle=#1}%
-  \else\@anim at missing{graphicx}\fi%
+  \g at addto@macro\@anim at gropts{, angle=#1}%
 }
 \newboolean{@anim at meas}
 \define at key{anim at user}{measure}[true]{%



More information about the tex-live-commits mailing list