4

How can I hide the animation in my code?. I use this image (.gif).

\documentclass[compress,red]{beamer}
\usepackage{etex}
\mode<presentation>
\usetheme{Warsaw}

\usepackage[applemac]{inputenc}%les accents pour mac
\usepackage{subfigure}
\usepackage{multicol}
\usepackage{animate}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage[all,knot]{xy}
  \xyoption{arc}
\usepackage{url}
\usepackage{array,ragged2e}
\usepackage{multimedia}
\usepackage{hyperref}
\usepackage{setspace}
\usepackage{multirow}

\begin{document}
\section{section1}

\frame{\frametitle{Titre de la fenetre}
\begin{itemize}
  \item point1
    \pause
  \item point2
   \pause
  \item point3
   \pause
  \item point4
  \animategraphics[height=1cm,width=1cm, autoplay,loop]{1}{listefigures/shadowscanner/im}{1}{11}
    \pause
  \item point5
\end{itemize}
}

\end{document}
  • 1
    There is no automatic tool for indenting the example code. You can use your keyboard :-) Next time just ask a new question for it (on meta obviously in this case). This information does not belong to the OP as it has nothing to do with your actual question. – Ruben Nov 15 '13 at 0:14
  • 1
    This seems to be a documented bug of the animate package. On p.22 of its documentation: "Animations should not be placed on multilayered slides created with presentation making classes such as Beamer or Powerdot. Although possible (on the last overlay of a slide, at best), the result might be disappointing. Put animations on flat slides only. (Of course, slides without animations may still have overlays.)" – Herr K. Nov 15 '13 at 0:59
  • @KevinC, thanks. I know that i can put animation in one slide using only command, but in this case I can not use \pause for the other slide in the same frame. It is so complicated to combine some command beamer. – BetterEnglish Nov 15 '13 at 2:29
  • If including the animated .gif file is an option, then you can use the movie15 package, which supports Beamer overlays. Simply replace the \animategraphics... with \includemovie{1cm}{1cm}{angel_an.gif}. Also, you need to comment out the multimedia package; otherwise there will be a conflict. – Herr K. Nov 15 '13 at 2:44
  • @KevinC thanks a lot. It is going but the movie does not appears. it seems that my Mac pro lucks a media player. – BetterEnglish Nov 15 '13 at 3:05
6

For insertion of animate generated animations into layered beamer frames use the following approach. It inserts a phantom box of the same size as the animation on frame overlays where the animation is to be hidden.

The original GIF was exploded into a set of PNG files angel_an-0.png ... angel_an-10.png by

convert  angel_an.gif angel_an.png

enter image description here

\documentclass{beamer}

\usepackage{animate}

\begin{document}
\section{section1}

\frame{\frametitle{Titre de la fen\^etre}
\begin{itemize}
  \item point1
    \pause
  \item point2
   \pause
  \item point3
   \pause
  \item point4
    \ifthenelse{\boolean{beamer@anotherslide}}{
      \phantom{\rule{0.6\linewidth}{0.45\linewidth}}
    }{
      \animategraphics[width=0.6\linewidth,height=0.45\linewidth,autoplay,loop]{3.33}{angel_an-}{0}{10}
    }
    \pause
  \item point5
\end{itemize}
}

\end{document}
| improve this answer | |
  • This is genius! Works great! – Ankush Mar 12 '15 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.