summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/animate/README.md
blob: e9af5c9f3bf4ee8b3591bb3bdda78dda431fc5ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# The `animate` LaTeX Package

© 2007--`\today` Alexander Grahn

https://gitlab.com/agrahn/animate

## Description

This package provides an interface to create portable, JavaScript driven PDF and SVG animations from sets of (vector) graphics or rasterized image files or from inline (vector) graphics, such as LaTeX-picture, PSTricks or pgf/TikZ generated pictures, or just from typeset text.

It supports the usual PDF making workflows, i. e.  pdfLaTeX, LaTeX ⇒ `dvips` ⇒ `ps2pdf` (Ghostscript)/Distiller, (Xe)LaTeX ⇒ `(x)dvipdfmx`, LuaLaTeX, and LaTeX ⇒ `dvisvgm` for SVG.

The resulting PDF with animations can be viewed in Acrobat Reader (except on mobile devices), in PDF-XChange and in Foxit Reader. Animated SVG are self-contained files that can be embedded into HTML using the `<object>` tag or opened directly in a Web browser, such as Firefox or Chromium.

Note, this file only gives a summary of usage and available package and command options. Please refer to the documentation [`animate.pdf`](animate.pdf) for details and examples.

*Keywords:* include portable PDF animation SVG animation animated PDF animated SVG dvisvgm html TeX4ht web animating embed animated graphics LaTeX pdfLaTeX LuaLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange Foxit Reader Firefox Chrome Chromium

## Usage

````latex
\usepackage[<package options>]{animate}
````

- **Package options:**

````
width=<h-size>, height=<v-size>, totalheight=<v-size>,
keepaspectratio, scale=<factor>,
bb=<llx> <lly> <urx> <ury>,
viewport=<llx> <lly> <urx> <ury>,
trim=<left> <bottom> <right> <top>,
clip, hiresbb, pagebox=..., interpolate,
type=[<file ext>],
final, draft, nomouse,
autopause, autoplay, autoresume,
controls[=all | none | ...],
controlsaligned=left[+<indent>] | center | right[+<indent>],
buttonsize=<size>,
buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,
loop, palindrome, step,
poster[=first | <num> | last | none],
alttext=none | {<alternative description>},
method=icon | widget | ocg,
dvipdfmx, dvisvgm, xetex,
export
````

- **User interface:**

````latex
\animategraphics[<options>]{<frame rate>}{<file basename>}{<first>}{<last>}

\begin{animateinline}[<options>]{<frame rate>}
    ... typeset material ...
\newframe[<frame rate>]
    ... typeset material ...
\newframe*[<frame rate>]
    ... typeset material ...
\newframe
\multiframe{<number of frames>}{[<variables>]}{
    ... repeated (parameterized) material ...
}
\end{animateinline}
````

- **Command options:**

````
width=<h-size>, height=<v-size>, totalheight=<v-size>,
keepaspectratio, scale=<factor>,
bb=<llx> <lly> <urx> <ury>,
viewport=<llx> <lly> <urx> <ury>,
trim=<left> <bottom> <right> <top>,
clip, hiresbb, pagebox=..., interpolate,
type=[<file ext>],
final, draft, nomouse,
autopause, autoplay, autoresume,
controls[=all | none | ...],
controlsaligned=left[+<indent>] | center | right[+<indent>],
buttonsize=<size>,
buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,
loop, palindrome, step,
measure,
poster[=first | <num> | last | none],
alttext=none | {<alternative description>},
begin={<begin text>}, end={<end text>},
timeline=<timeline file>,
method=icon | widget | ocg,
every=<number>, label=<label text>
````

## Requirements

Recent versions of
- Ghostscript or Adobe Distiller
- dvipdfmx
- dvisvgm
- PDF: Acrobat Reader, PDF-XChange, Foxit Reader
- SVG: Blink-based web browsers (Chromium, Chrome, Opera, ...) or Firefox

## Installation

Unzip the file
[`animate.tds.zip`](http://mirrors.ctan.org/install/macros/latex/contrib/animate.tds.zip) into the local TDS root directory which can be found by running

````bash
kpsewhich -var-value TEXMFLOCAL
````

on the command line.

After installation, update the filename database by running `texhash` on the command line.

TeXLive and MiKTeX users should run the package manager for installation.

## License

This material is subject to the [LaTeX Project Public License](http://mirrors.ctan.org/macros/latex/base/lppl.txt).