Tag Info

Hot answers tagged

23

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 ...


22

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} ...


21

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} ...


18

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 will be ...


14

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} ...


14

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 ...


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

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 ...


9

\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 ...


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 ...


7

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} { ...


7

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 ...


7

The problem is that \animategraphics uses LaTeX's \IfFileExists that uses the space as end marker of the file name. Then the result \@filef@und contains the file name including a final space. \animategraphics then removes the space via \zap@space that also kills spaces in between. The following workaround redefines \animategraphics. It uses package grffile ...


7

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} ...


6

I'm not sure to understand. Do you want something like this? I've created two new commands \texthide and \textshow \newcommand*{\texthide}[1]{\underline{\phantom{#1}}} \newcommand*{\textshow}[1]{\underline{#1}} the first to be used when you want the text to be hidden and the latter when you what the text to be shown. They have to be used as in the ...


6

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 ...


6

This error only occurs if the document is typeset with pdflatex or lualatex, while xelatex, latex+dvips+ps2pdf work smoothly. animate puts the animation frame content first into a box, using the LaTeX \savebox command. The filled box is then distilled into a PDF Form XObject using the command \pdfxform from pdfTeX. The last step fails, if the box contains ...


6

Just omit any post-scaling options, such as width or scale. Then the original size, that is the size of the first graphics of the sequence, will be used for the animation. In your case, width=1\linewidth will resize the width of the animation to the line width of the hosting document. This is the largest width I would recommend, as a larger animation would ...


6

These "player buttons" are unique to the animate package and are constructed from low-level Postscript commands. The following MWE provides an interface to the symbols, entirely extracted from animate.sty (minus some colour settings). Each of the symbols is 15pt in width. Since the commands are low-level, they produce a zero-width representation within ...


6

This disables the animateinline environment, and modifies the \multiframe loop so that it does \only<2|handout:2>{.....} with the loop counter being used in <...> so beamer does its normal stuff and makes a slide corresponding to each frame of the iteration. (only the two lines marked XXX are modified. The handout specification is needed to ...


6

The problem is that animate will put all frames in the box of the size of the first frame. You need to establish a bounding box in the TikZ picture that will encompass all frames. This has also been discussed in the animate manual on page 8: A short note on the tikzpicture environment: Unlike pspicture, the tikzpicture environment is able to determine ...


5

While loading animate, the command \pdfcatalog{/AcroForm <</Fields []/NeedAppearances true>>} is executed. Strangely, the sheer existence of the AcroForm dictionary in the PDF catalog causes Adobe Reader to prompt for saving when the document is closed, and even more strangely, yet fortunately, it does not, if there is at least one animation ...


5

The manual of animate is quite explicit about this, as stated in the comment. If you are not satisfied with the text/graphics rendering in Adobe Reader you might want to play with its display settings: go Edit->Preferences->Page Display.


5

The reason is loosely explained in the Bugs section of the animate doc. -Ppdf loads config.pdf during DVI to PS conversion and sets the dots-per-inch resolution (DPI) in the intermediate Postscript to the value of 8000. This is equivalent to using dvips option -D8000. The only benefit of this high resolution is related to fonts generation in case of Type-3 ...


5

animate uses JavaScript because if you want animations in PDF you need either an external program (i.e. you have to include movies) or scripting support in the viewer - and the only viewer with scripting support is Adobe Reader with JavaScript. So Lua won't help you there unless you also have a viewer with Lua support (which would make you PDFs incompatible ...


5

This is a possible solution where animationinline is used from animate package. Please copy and paste, then compile to see the animation. Basically, one wraps the tikzpicture in an animationinline environment as shown below. Here controls means push bottoms are shown while autoplay won't have push bottoms. {10} means frames per section. imedeg is an integer ...


5

Run pdflatex on this first file named anim.tex : \documentclass{beamer} \usepackage{tikz,pgfplots,multido} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \begin{document} \multido{\i=0+1}{10}{% \begin{tikzpicture} \begin{axis}[ width=2in, height=2in, scale only axis, minor tick num=10, xmin=1, xmax=10, ymin=1, ymax=10, axis x ...


5

\documentclass{beamer} \usepackage{multido} \begin{document} \begin{frame}[t] \begin{center} \only<1->{test} \multido{\iA=40+-1}{40}{\only<+>{\rule{0pt}{\iA ex}test}} \end{center} \end{frame} \end{document} An animation with package animate. Run it with xelatex or latex->dvips->ps2pdf: \documentclass{beamer} \usepackage{pstricks} ...


5

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}[ ...


4

It is a bug in animate. The macro \@anim@@sanitize is executed several times, one for each token in the list .:;?!/"'*+,->=<$&@][)(^_|~`, and each time it does \global\let\@anim@leftbrace=\{\global\let\{=\@anim@lbr The first time, \@anim@leftbrace saves the meaning of \{, but the second time it just saves the meaning of \@anim@lbr. Later, ...



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