www.xbdev.net
xbdev - software development
Friday May 7, 2021
home | about | contact | Donations

     
 

LaTeX

Beautiful, Powerful and Fun Document Tools (but requires a little extra work)

 


A custom flip book effect that puts a small animation next to the word number.



\documentclass{scrbook}
\usepackage{tikz}     % tikzpicture
\usepackage{lipsum}   % \lipsum
 
\usepackage{eso-pic}  % \AddToShipoutPictureBG
\usepackage{graphicx} % \includegraphics
 

\newcounter{framenumber}
\newcommand\animatexy{%
  \gdef\myimage{./me/image\theframenumber.png}%
  \AddToShipoutPictureBG{%
  \ifodd\value{page}%
  %\includegraphics[width=0.8in]{\myimage}%debug
  \begin{tikzpicture}[remember picture, overlay]%
  \draw (16.0cm,   4.05cm) node[anchor=south west,inner sep=0] {\includegraphics[height=0.5cm]{\myimage}};%
  \end{tikzpicture}%
  \else
  % if you want something on the even page
  \fi
  }
}

% repeats/wraps the animation
\AddToShipoutPictureBG{\stepcounter{framenumber}%
   \ifnum\theframenumber>24\setcounter{framenumber}{1}\fi}
 

\begin{document}

\animatexy{}
  
Once upon a time
\cleardoublepage
a long long long time ago ...
\lipsum[1-550]
\lipsum[1-550]
\lipsum[1-550]

\end{document}











 

 
 Visitor: 9534626
{ 229.27.38.75 }
Copyright (c) 2002-2020 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.