Hot answers tagged

26

I used your question to finally try out the animate package. The "animation" is in an external file, it uses the standalone package and the markings decoration of tikz: "Animation" code \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{decorations.markings} \begin{document} \tikzset{reddot/.style={decoration={markings, mark=between positions #1 ...


25

Last edit: With the invaluable assistance of Paul Isambert, I wrote the ocgx package. Here is an example with ocgx package (available via CTAN and via TeXLive). Three screenshots: The code: \documentclass{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{tikz} \usetikzlibrary{ocgx,calc} \begin{document} \...


25

Just a proof of concept; the flow was created with a very thick dashed line with a particular dash pattern; the illusion of movement was obtained using a different value for dash phase in even and odd slides (thanks to Jake for this suggestion that simplyfied my initial code): \documentclass{beamer} \usepackage{tikz} \def\phase{0pt} \begin{document} \...


23

For the first part of the requirements, the TikZ \foreach command can parse a list of coordinates which can be stored in a macro. The following illustrates how it can be done. It should be straightforward to adapt the code for the required use-case: \documentclass[tikz,border=5]{standalone} \begin{document} \def\pointlist{ (1.0,1.0), (2.3,1.1), (4.5,0.8), ...


21

1 beamer class document in SVG format Think about giving up the PDF format in favour of SVG. Animations run in all contemporary Web browsers, while Blink-based ones (Chromium, Chrome, Opera) have the best performance. Also run on mobile devices. Click the image to start presentation in the Web browser and press F11 for full-screen. Navigate through slides ...


20

For simulating terminal output you will have to maintain a line buffer. In the example below I am using the sequence data type of LaTeX3 for this purpose. A minipage of given width and number of lines height is used to mimick the terminal window. If the number of lines in the buffer goes past the height of the minipage, the top line in the buffer is removed. ...


18

The easiest thing is to use the animateinline environment and then "manually" include the images, and lastly make the last image have a slow frame rate. However, I would like to show you a couple of possibilities with the animate package. Throughout this the distinction between image and frame is not enforced. Please ask if in doubt. Animation problems ...


18

1 Animated SVG (animate [2018/11/20]) suitable for inclusion in Web pages (or viewed standalone, also on mobile devices) freely scalable (vectorial graphics) relies on M. Gieseking's dvisvgm output driver/utility (available in TeXLive and MikTeX) compile with latex myAnim.tex % or lualatex --output-format=dvi or xelatex --no-pdf dvisvgm --exact --font-...


17

Does the animate package do things with the shipout routine of TeX? The external lib replaces it -- probably in an incompatible way. Nevertheless, the following approach also works: \documentclass{article} \usepackage{pgfplots} \usepackage{animate} % Comment out the following line to see what the plot looks like. \usepgfplotslibrary{external} \...


16

Here is an animate based solution with links that act as switches: \documentclass{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{tikz} \usepackage{animate} \usepackage{hyperref} \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % command to create toggle link to ...


16

The PDF file has a cross-reference table that records the file offsets for indirect objects. These offsets are stored with ten decimal digits. This limits the maximum file size to about 1010 bytes (approximately 10 GB). Other limiting factors: File system. 32-bit software needs to be compiled with large file support (AFAIK pdfTeX has large file support). ...


13

First, I think this is a bad idea. There's no good reason to run convert as part of running pdflatex. That said, it can be done. There are four basic steps. Determine which .gif files you want to animate. Convert foo.gif into foo-0.png, foo-1.png, ..., foo-n.png. Determine n. Make the figure. For step 1, you could use bashful to find all of the .gif files,...


11

You can optimize the PDF animation for size using differential bitmaps and the timeline feature of the animate package. Note however, that with every new animation frame to be shown the number of differential frames that needs to be re-displayed increases by one. This may slow down a running animation as time advances. Adobe Reader was not primarily ...


10

\usepgfplotslibrary{external} and package animate don't work well together. \tikzexternalize moves the tikzpicture environment into an external file to be processed separately (therefore, --shell-escape must be activated) and replaces the tikzpicture environment with \includegraphics. On the first pass when no external pdf graphics are available, the boxes ...


10

All in one approach Read the comments whether or not you need ImageMagick and/or FFMPEG installed on your machine. \documentclass{article} \usepackage{filecontents} % create a parameterized template \begin{filecontents*}{template.tex} \documentclass[tikz,border=12pt]{standalone} \usepackage{pgfplots} \begin{document} \foreach \ind in {1,2,...,30} { ...


10

2nd UPDATE Being an FRE (Frequently Requested Enhancement), the possibility of selecting specific buttons from the available set of controls was implemented, finally, in animate version [2017/05/18]. For MiKTeX users, this feature is already available, TeXLive users will have to wait until the release of TeXLive 2017, or get a preview on ShareLaTeX. con­...


10

Similar to Herbert answer but with TikZ: \documentclass{beamer} \usepackage{tikz} \usepackage{animate} \setbeamersize{text margin left=0cm,text margin right=0cm} % removing text margins so that all the frame space will be available \beamertemplatenavigationsymbolsempty \begin{document} \begin{frame} \begin{animateinline}[ begin={\begin{...


9

What makes a PDF with working animations no longer work? There are 3 cases that will make working animations in a PDF file NO longer work. For simplicity, let animation.pdf be the PDF file with working animations. We compress animation.pdf with gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=animation-compressed....


9

Character for character The usage of the xstring macros is taken from the linked question. The width of the text (in \Huge style) is saved to \mytextwidth. As \StrLen counts from 0 to, in this case, 27, \multiframe needs to animate 28 frames, which is why \mylen+1 is calculated and saved to \frames. This example uses the \multiframe macro because we can ...


9

This can be done using a simple variation of a progress bar, as in Progress bar for latex-beamer; I used some of my own images man1, man2, but you can use your own: \documentclass{beamer} \usetheme{CambridgeUS} \usepackage{tikz} \makeatletter \def\progressbar@progressbar{} % the progress bar \newcount\progressbar@tmpcounta% auxiliary counter \newcount\...


9

Put \alt<2>{% \animategraphics[scale=0.4,autoplay]{8}{movie}{000}{200}% }{% \includegraphics[scale=0.4]{movie000}% } into the frame body. Complete example using multipage PDF from pkg mwe as animation frames: \documentclass{beamer} \usepackage{animate} \begin{document} \begin{frame}[t]{Animation} \dots started on ``next slide'':\\[2ex] \alt&...


9

Below I present two options. Using the animate package Here's a simple example, using the animate package. Initially you see "A" and "B" four centimeters apart and at the same height: when you play the animation (Acrobat Reader, please (restriction from animate)), "A" starts moving towards "B", and ends just below "B": \documentclass{beamer} \usepackage{...


9

Pure LaTeX: (fileName_1.pdf ... fileName_?.pdf) \documentclass{article} \usepackage{animate} \usepackage{graphicx} \newcounter{NumFiles} %\setcounter{NumFiles}{-1} % fileName_0.pdf ... fileName_?.pdf \newboolean{stop} \whiledo{\NOT\boolean{stop}}{ \stepcounter{NumFiles} \IfFileExists{./pdfFolder/fileName_\theNumFiles.pdf}{}{ \addtocounter{NumFiles}...


8

There is no need for two separate source files. The parameterized (i=0...9) tikzpicture can be placed into a \multiframe code block within the animateinline environment. Note, that for some reason the [fragile] option must be used with beamer's frame environment. \documentclass{beamer} \usepackage{animate} \usepackage{tikz,pgfplots} \begin{document} \...


8

Synposis: %put a longer paragraph of text in a box \newsavebox\lipsumbox \begin{lrbox}{\lipsumbox}% \begin{minipage}{\textwidth}% \strut \lipsum \strut \end{minipage} \end{lrbox} %scroll the box content within a viewport of limited height \smoothscroll[autoplay]{\lipsumbox}{0.93\textheight}{400}{25} Usage: \smoothscroll[autoplay] {<...


8

All frames must share the same, manually inserted bounding box (in 2D screen coordinates) in order to override the automatic, TikZ-computed ones (which may differ from frame to frame). For parameterized pictures within the animateinline environment, the \multiframe command is to be preferred over \whiledo: \documentclass{article} \usepackage{tikz} \...


8

The following two MWEs should give you a general idea on how you could use the animate package. In order to successfully compile these examples, you will need four images called example_1 to example_4 in the same directory as your .tex file. 1: Animation proceeds to the next transparency only when clicking on the mouse button: (Please note the step option) ...


8

Two animations in one frame. Buttons used for simultaneous playback control. The JavaScript interface of animate is used for defining the button actions. Animations can be played back individually by clicking them directly. \documentclass{beamer} \usepackage{animate} \usepackage{media9} %\mediabutton \usepackage{fontawesome} \begin{document} \begin{frame}...


Only top voted, non community-wiki answers of a minimum length are eligible