# [pstricks] [animate.sty] producing a sequence of Pstricks files

Patrick Drechsler patrick at pdrechsler.de
Sun Feb 10 00:07:47 CET 2008

Herbert Voss <Herbert.Voss at FU-Berlin.DE> writes:

> Patrick Drechsler schrieb:
>
>> I would like to produce a sequence of individual pstricks files. Is
>> there a LaTeX (or Pstricks) method to do this?
>
> http://tug.org/PSTricks/main.cgi?file=Animation/basics

Thank you for pointing out the examples (I've also looked at AcroTeX,
but it has too many dependencies I can not fulfill at the moment).

I am still trying to understand the contents of the links provided on
this page. Although the examples by Manuel Luque look very cool, they
are way over my head (mainly because my french is very rusty).

Nevertheless, the examples for using the package "animate" are similar
to the examples published with the documentation of the package. They
use the *inline* capabilities to produce animations. As I wrote in my
original mail:

>> I would like to refrain from using the inline version of writing code
>> in favour of using external files (each "frame" in a separate file).

The reason for this is that my system does not provide the required
GhostScript version. I would therefore like to create the animation on a
different system and than include it on my main document.

I think it might work using a combination of the "preview" and "pst-pdf"
package. Here is a new example:

*b-main.tex*
(this file can be compiled on a system with ghostscript <8.31):
--8<---------------cut here---------------start------------->8---
\documentclass{beamer}
\usepackage{animate}
\usepackage{graphicx}
\begin{document}
\begin{center}
\animategraphics[
controls, loop,
timeline=timeline.txt
]{4}{b-images-pics}{}{}
\end{center}
\end{document}
--8<---------------cut here---------------end--------------->8---

*b-images.tex*
(run ps4pdf; this pdf file has to be created on a system with
ghostscript >8.31; output file is called b-images-pics.pdf):
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{pst-pdf}
\pagestyle{empty}
\begin{document}
\begin{pspicture}[showgrid=false](5,5)
\pscircle(1,1){1}
\end{pspicture}
\begin{pspicture}[showgrid=false](5,5)
\pscircle(2,2){1}
\end{pspicture}
\begin{pspicture}[showgrid=false](5,5)
\pscircle(3,3){1}
\end{pspicture}
\end{document}
--8<---------------cut here---------------end--------------->8---

Can I create the file b-images-pics.pdf using "whiledo" or "multido"
instead of having a "pspicture"-environment for each frame?

Is my question phrased in an understandable manner? Please do not
hesitate to ask for further details.

Cheers,

Patrick

BTW, there is a typo on the link you have provided:

http://tug.org/PSTricks/main.cgi?file=Animation/basics

should be "package animate" (with an "e" at the end).