summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/animate/animate.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-29 23:19:26 +0000
committerKarl Berry <karl@freefriends.org>2018-11-29 23:19:26 +0000
commit67346dfe318b0d3d08c7104eefd0a5bc34a84996 (patch)
treec1e6b7b92c82d3ba834a8014af594d7248d9d6fe /Master/texmf-dist/source/latex/animate/animate.tex
parent62fd2d08a3db1709b036e097b68370d78ab5b5c7 (diff)
animate (29nov18)
git-svn-id: svn://tug.org/texlive/trunk@49273 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/animate/animate.tex')
-rw-r--r--Master/texmf-dist/source/latex/animate/animate.tex30
1 files changed, 16 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/animate/animate.tex b/Master/texmf-dist/source/latex/animate/animate.tex
index 786bc1a2989..f3c272d1c03 100644
--- a/Master/texmf-dist/source/latex/animate/animate.tex
+++ b/Master/texmf-dist/source/latex/animate/animate.tex
@@ -107,11 +107,13 @@
\section{Introduction}
This package provides an interface for creating PDF and SVG files 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 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 workflows for making PDF, i.\,e. pdf\LaTeX{}, Lua\LaTeX{}, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+. For animated SVG, it supports the \verb+dvisvgm+ driver. The DVI/XDV used as input for \verb+dvisvgm+ can be generated with \LaTeX{}, Lua\LaTeX{} (in DVI mode) and \XeLaTeX.
+
+PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), PDF-XChange and Foxit Reader. Animated SVG produced by means of \LaTeX{} and \verb+dvisvgm+ are self-contained files that can be embedded into HTML using the \verb+<object>+ tag or opened directly in a Web browser, such as Firefox or Chromium.
-Package `animate' supports the usual workflows for making PDF, i.\,e. pdf\LaTeX{}, Lua\LaTeX{}, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+, and \LaTeX{} $\rightarrow$ \verb+dvisvgm+ for SVG.
+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.
-PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), PDF-XChange and Foxit Reader. Animated SVG produced by means of \LaTeX{} and \verb+dvisvgm+ are self-contained files that can be embedded into HTML using the \verb+<object>+ tag or opened directly in a Web browser, such as Firefox or Chromium.
+On mobile devices, interaction with an animated SVG is similar to that on desktop devices, just using finger touches instead of mouse button press/release. To permanently pause an animation without the pause button, touch the animation with a second finger, then lift both fingers off.
\section{Requirements}
\begin{trivlist}
@@ -169,7 +171,7 @@ poster[=first | <num> | last | none]
\end{verbatim}
Except for `\verb+dvipdfmx+', `\verb+xetex+', `\verb+dvisvgm+' and `\verb+export+', the listed package options 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+', `\verb+xetex+', `\verb+dvisvgm+ and `\verb+export+', by appending `\verb+=false+'.
-\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.
+\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.
All workflows require the `graphicx' package to be loaded explicitly.
@@ -238,7 +240,7 @@ For example, given the sequence `frame\_5.png' through `frame\_50.png' from a po
\animategraphics{12}{frame_}{5}{50}
\end{verbatim}
-The possible file formats depend on the output driver being used. In the case of \LaTeX{} + \verb+dvips+, files with the `eps' extension are at first searched for, followed by `mps' (\MP-generated Postscript) and `ps'. With pdf\LaTeX{} and Lua\LaTeX{} the searching order is: (1)~`pdf', (2)~`mps', (3)~`png', (4)~`jpg', (5)~`jpeg', (6)~`jbig2', (7)~`jb2', (8)~`jp2'\footnotemark[1], (9)~`j2k'\footnotemark[1], (10)~`jpx'\footnotemark[1]\footnotetext[1]{Only Lua\LaTeX{} currently supports JPEG2000.}, with \XeLaTeX{} or \LaTeX{}+\verb+dvipdfmx+: (1)~`pdf', (2)~`mps', (3)~`eps', (4)~`ps', (5)~`png', (6)~`jpg', (7)~`jpeg', (8)~`bmp', and with \LaTeX{}+\verb+dvisvgm+: (1)~`eps', (2)~`ps', (3)~`svg', (4)~`png', (5)~`jpg', (6)~`jpeg'. That is, files capable of storing vector graphics are found first. Make sure that all file names have \emph{lower case} extensions.
+The possible file formats depend on the output driver being used. In the case of \LaTeX{} + \verb+dvips+, files with the `eps' extension are at first searched for, followed by `mps' (\MP-generated PostScript) and `ps'. With pdf\LaTeX{} and Lua\LaTeX{} the searching order is: (1)~`pdf', (2)~`mps', (3)~`png', (4)~`jpg', (5)~`jpeg', (6)~`jbig2', (7)~`jb2', (8)~`jp2'\footnotemark[1], (9)~`j2k'\footnotemark[1], (10)~`jpx'\footnotemark[1]\footnotetext[1]{Only Lua\LaTeX{} currently supports JPEG2000.}, with \XeLaTeX{} or \LaTeX{}+\verb+dvipdfmx+: (1)~`pdf', (2)~`mps', (3)~`eps', (4)~`ps', (5)~`png', (6)~`jpg', (7)~`jpeg', (8)~`bmp', and with \LaTeX{}+\verb+dvisvgm+: (1)~`eps', (2)~`ps', (3)~`mps', (4)~`svg', (5)~`png', (6)~`jpg', (7)~`jpeg'. That is, files capable of storing vector graphics are found first. Make sure that all file names have \emph{lower case} extensions.
This searching procedure can be skipped thanks to the package and command option `\verb+type=<file ext>+'. It enforces the embedding of files with the given file name extension \verb+<file ext>+.
@@ -309,7 +311,7 @@ Scales the animation widget by \verb+<factor>+.
\begin{verbatim}
bb=<llx> <lly> <urx> <ury>
\end{verbatim}
-(\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.
+(\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}
@@ -1122,8 +1124,8 @@ dt dt Tm nT mul { % pop
\psline(! -.1 \psk@oscmetronomed neg)(!0.1 \psk@oscmetronomed neg)\psline(! 0 \psk@oscmetronomed neg 0.1 sub)(!0 \psk@oscmetronomed neg 0.1 add)}
\pnode(!0 \psk@oscmetronomex){C}% curseur
\pnode(! 0 \psk@oscmetronomed neg){D}% disque
-\pstextpath[c](0,-2ex){\psarcn[linestyle=none](D){1}{180}{0}}{\small\textsf{\textbf{m e t r o n o m e}}}
-\pstextpath[c](0,1ex){\psarc[linestyle=none](D){1}{180}{0}}{\small\textsf{\textbf{P S t r i c k s}}}
+%\pstextpath[c](0,-2ex){\psarcn[linestyle=none](D){1}{180}{0}}{\small\textsf{\textbf{m e t r o n o m e}}}
+%\pstextpath[c](0,1ex){\psarc[linestyle=none](D){1}{180}{0}}{\small\textsf{\textbf{P S t r i c k s}}}
\end@SpecialObj%
\endgroup}
\psmetronome%
@@ -1295,13 +1297,13 @@ dt dt Tm nT mul { % pop
\end{lstlisting}
\section{Producing animated SVG}
-Thanks to Martin Gieseking's `\verb+dvisvgm+' utility~\cite{dvisvgm} that ships with all major \TeX{} distributions, package `animate' can produce self-contained animated SVG, with all the bits and pieces already included that are necessary to run in modern Web browsers as standalone files or as embedded objects within a Web page made of HTML. Animations have the same look and usability, including optional control buttons, as if they were embedded in a PDF document.
+Thanks to Martin Gieseking's `\verb+dvisvgm+' utility~\cite{dvisvgm} that ships with all major \TeX{} distributions, package `animate' can produce self-contained animated SVG, with all the bits and pieces already included that are necessary to run in modern Web browsers as standalone files or as embedded objects within a Web page made of HTML. Animations have the same look and usability, including optional control buttons, as if they were embedded in a PDF document. Animated SVG even work on mobile devices.
-Moreover, as `\verb+dvisvgm+' is linked against the Ghostscript library, it can parse and convert embedded Postscript to inline SVG code. It is therefore compatible with the popular TikZ and PSTricks \LaTeX{} packages.
+As `\verb+dvisvgm+' is linked against the Ghostscript library, it can parse and convert embedded PostScript to inline SVG code. It is therefore compatible with the popular TikZ and PSTricks \LaTeX{} packages.
-SVG is a one-page graphics format. Therefore, it is most useful to first produce DVI with a single animation per file or page. Then, `\verb+dvisvgm+' converts every page of the DVI input to a standalone SVG file. For a standalone animated SVG, use the `article' document class and pass `\verb+dvisvgm+' as a global option. In this way, it gets conveyed to `animate' and other packages to be loaded, such as `graphicx' or TikZ. Note that the `standalone' document class is not required; `\verb+dvisvgm+' already computes the tightly enclosing bounding box around the page content by default.
+SVG is a one-page graphics format. Therefore, it is most useful to first produce DVI with a single animation per file or page. Then, `\verb+dvisvgm+' converts every page of the DVI input to a standalone animated SVG file. Use the `article' document class and pass `\verb+dvisvgm+' as a global option. In this way, it gets conveyed to `animate' and other packages to be loaded, such as `graphicx' or TikZ. Note that the `standalone' document class is not required; `\verb+dvisvgm+' already computes the tightly enclosing bounding box around the page content by default.
-The following code may serve as a template for generating standalone SVG:
+The following code may serve as a template for generating standalone animated SVG:
\begin{lstlisting}
\documentclass[12pt,dvisvgm]{article}
@@ -1330,7 +1332,7 @@ The following code may serve as a template for generating standalone SVG:
\end{center}
\end{document}
\end{lstlisting}
-Note that when animating external graphics with \verb+\animategraphics+, only Postscript (EPS, PS) files are converted to inline SVG code; files in other formats (SVG, PNG, JPEG) remain external and must be bundled with the final SVG output. Unfortunately, the use of (E)PS with \verb+\animategraphics+ is limited to vector graphics. If such files contain bitmapped content they must be converted to PNG (or JPEG, if photographs). Of course, these files remain external to the final animated SVG.
+Note that when animating external graphics with \verb+\animategraphics+, only PostScript (EPS, PS, MPS) files are converted to inline SVG code; files in other formats (SVG, PNG, JPEG) remain external and must be bundled with the final SVG output. Also note that PostScript files must have the fonts embedded. This is not always the case for \MP-generated PostScript. Here, embedding of fonts is ensured putting `\verb+prologues := 3+' into the header of the \MP{} input. Unfortunately, animating PostScript files with \verb+\animategraphics+ is limited to vector graphics. If such files contain bitmapped content they must be converted to PNG (or JPEG, if photographs). Of course, these files remain external to the final animated SVG.
Use one of
\begin{verbatim}
@@ -1341,7 +1343,7 @@ xelatex -no-pdf
\end{verbatim}
to produce DVI or XDV output from the \LaTeX{} source. After this, SVG is obtained by running
\begin{verbatim}
-dvisvgm --no-fonts -exact
+dvisvgm --no-fonts --exact
\end{verbatim}
on the intermediate DVI or XDV file. Option `\verb+--no-fonts+' prompts `\verb+dvisvgm+' to retrace font glyphs as graphical paths. It ensures that the text font looks as in normal PDF output. Option `\verb+--exact+' tells `\verb+dvisvgm+' to calculate exact bounding boxes around font glyphs. This avoids clipping of glyphs in the SVG output, as glyphs usually tend to be slightly bigger than their boxes defined in the font files. To convert multipage DVI/XDV with several animations, add option `\verb+-p1,-+'. By default, `\verb+dvisvgm+' processes only the very first page of the input file. As SVG derives from XML it is not known to be particularly economical in terms of file size. Compressed SVG, with file extension `\verb+svgz+', shortens download times and is supported by most Web browsers. It can be generated by adding option `\verb+-z+'.