Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 3

07 Sep '18, 17:10

alexg's gravatar image

alexg
1112

Solution utilisante `animate` (Acrobat Reader). On peut enlever la page 1 afin de placer l'image aléatore aléatoire sur la page couvrante. Ici elle sert à éviter d'ouvrir/fermer le fichier PDF. Une fois ouvert, il suffit de feuilleter pour voir l'effet. \documentclass{article} \usepackage{animate} \usepackage{graphicx} \ExplSyntaxOn \let\PdfAnnot\pbs_pdfannot:nnnn \ExplSyntaxOff \begin{document} Page 1. \newpage \begin{animateinline}[label=randImg,nomouse,poster=last]{1} \includegraphics{example-image-a} \newframe \includegraphics{example-image-b} \newframe \includegraphics{example-image-c} \newframe % blanc \end{animateinline}% \PdfAnnot{1pt}{1pt}{0pt}{ /Subtype/Screen/F 2 % non interactive annotation /AA << % additional actions /PO << % on page-open /S/JavaScript /JS ( anim.randImg.frameNum = Math.floor(Math.random() * (anim.randImg.numFrames-1)); ) >> /PC << % on page-close show empty frame /S/JavaScript /JS ( anim.randImg.frameNum = anim.randImg.numFrames-1; ) >> >> } \end{document}
cliquez ici pour masquer/afficher la révision 2

07 Sep '18, 17:09

alexg's gravatar image

alexg
1112

Solution utilisante `animate` (Acrobat Reader): Reader). On peut enlever la page 1 afin de placer l'image aléatore sur la page couvrante. Ici elle sert à éviter d'ouvrir/fermer le fichier PDF. Une fois ouvert, il suffit de feuilleter pour voir l'effet. \documentclass{article} \usepackage{animate} \usepackage{graphicx} \ExplSyntaxOn \let\PdfAnnot\pbs_pdfannot:nnnn \ExplSyntaxOff \begin{document} Page 1. \newpage \begin{animateinline}[label=randImg,nomouse,poster=last]{1} \includegraphics{example-image-a} \newframe \includegraphics{example-image-b} \newframe \includegraphics{example-image-c} \newframe % blanc \end{animateinline}% \PdfAnnot{1pt}{1pt}{0pt}{ /Subtype/Screen/F 2 % non interactive annotation /AA << % additional actions /PO << % on page-open /S/JavaScript /JS ( anim.randImg.frameNum = Math.floor(Math.random() * (anim.randImg.numFrames-1)); ) >> /PC << % on page-close show empty frame /S/JavaScript /JS ( anim.randImg.frameNum = anim.randImg.numFrames-1; ) >> >> } \end{document}
cliquez ici pour masquer/afficher la révision 1

07 Sep '18, 17:01

alexg's gravatar image

alexg
1112

C'est votre première visite ici ? Consultez la FAQ !

×