1

I am trying to adapt the answer of AlexG to this post in order to get a beamer presentation which includes an animation.

The problem is that I use some personnalized beamer theme slide and for some reason a part of the slide is destroyed when I follow this procedure.

The files of my personnalized theme and the pdf images that I use in the latex code below are all available here.

Here's an example of .tex file which works fine with pdflatex :

\documentclass[dvisvgm,hypertext,aspectratio=169]{beamer}
\usetheme{wamclassic}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}
\usepackage{animate}
\usepackage{graphicx}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % PageDown, PageUp key event handling; navigation symbols %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[totpages]{zref} \usepackage{atbegshi} \usepackage{fontawesome} \setbeamertemplate{navigation symbols}{} \AtBeginShipout{% \AtBeginShipoutAddToBox{% \special{dvisvgm:raw <defs> <script type="text/javascript"> <![CDATA[ document.addEventListener('keydown', function(e){ if(e.key=='PageDown'){ \ifnum\thepage<\ztotpages document.location.replace('\jobname-\the\numexpr\thepage+1\relax.svg');% \fi }else if(e.key=='PageUp'){ \ifnum\thepage>1 document.location.replace('\jobname-\the\numexpr\thepage-1\relax.svg');% \fi% } }); ]]> </script> </defs> }% }% \AtBeginShipoutUpperLeftForeground{% \raisebox{-\dimexpr\height+0.5ex\relax}[0pt][0pt]{\makebox[\paperwidth][r]{% \normalsize\color{jolijaune}% \ifnum\thepage>1% \href{\jobname-\the\numexpr\thepage-1\relax.svg}{\faArrowLeft}% \else%
\textcolor{lightgray}{\faArrowLeft}%
\fi\hspace{0.5ex}% \ifnum\thepage<\ztotpages% \href{\jobname-\the\numexpr\thepage+1\relax.svg}{\faArrowRight}% \else% \textcolor{lightgray}{\faArrowRight}%
\fi% \hspace{0.5ex}% }}% }%
}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{\hspace{1.5cm} Name -- Title of the talk}

\institute{LJLL, Sorbonne Université}

\begin{document}

\begin{frame} \frametitle{First slide} \begin{center} This beamer style will be destroyed. \end{center} \end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame} \frametitle{Destroyed} \vfill \makebox[\textwidth]{\animategraphics[loop,controls]{30}{image}{1}{2}} \vfill \end{frame}

\begin{frame} \frametitle{Destroyed} \vfill \makebox[\textwidth]{\animategraphics[loop,controls]{30}{image_small}{1}{2}} \vfill \end{frame} \end{document}

With the previous code and using pdflatex, the animation is included in a proper way :

enter image description here

However, if I replace the first line of the tex file above by

\documentclass[dvisvgm,hypertext,aspectratio=169]{beamer}

and compile it with (as suggested by AlexG in the post cited above)

latex example
latex example
dvisvgm --font-format=woff2 --bbox=papersize --zoom=-1 -p1,- --output=%f-%1p example

The result can then be looked on a browser (I use Chromium) ; unfortunately a part of the slide is then missing. The line below with name, title and date disappear and also the arrows in the upper right part ; it seems that all the beamer layer as been erased :

enter image description here

I tried playing with the size of the animategraphics command but whatever I try, it's even getting worse ! I also tried reducing the image's size (that's the purpose of the image_small* files), it does not solve the issue. Strangely enough it seems even worse (and a part of the image itself seems to be destroyed, the horizontal line above is gray). Any clue ? Playing with the size of the animategraphics seems tricky ...

enter image description here

xounamoun
  • 221

0 Answers0