Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Making sub-files, that are compiled separately, not only helps reducing the compilation time for the main input file but also helps us to separately test the sub-file in the development phase. Sub-files often use preview package to produce tight PDF images that will be imported later from within the main input file.

From my experience, preview package cannot work together with animate package. Shortly speaking, is there a good way to separately test code fragments with animate package loaded? Putting these code fragments in the main input file seems a bad strategy because during the development phase you will waste much time to compile them. Separating each of them in a not-standalone as follows

% shrinking.tex
\animateinline[palindrome,autoplay]{10}
\multiframe{11}{r=1+-0.1}{%
\pspicture(2,2)
\pscircle*[linecolor=red,opacity=0.5](1,1){\r}
\endpspicture}
\endanimateinline

and importing it later in the main input file can work. But the question is, how do you compile shrinking.tex during the development phase to get a tight paper size? You might think why do you need a tight paper size in the development phase if the imported PDF animate will no longer work. OK. It is my personal restriction that does not make sense of course!

share|improve this question
    
In your main document, you could use draft as document or animate package option and final as local command option for the animation you are currently working on. Perhaps, this saves some time, at least for the dvips and ps2pdf steps. –  AlexG Aug 17 '11 at 13:37
    
@Alexander: Which method will produce faster animation viewed on Adobe Reader, animateinline or animategraphics? –  xport Aug 17 '11 at 13:43
    
They seem to produce identical results (I used the measure option for getting the FPS). The PDF file structure is similar for both. Some differences (in the file structure) result from using different drivers (dvips/ps2pdf vs. pdftex) but they don't impinge on animation performance. –  AlexG Aug 17 '11 at 14:18
add comment

1 Answer 1

up vote 2 down vote accepted

Run this document with

\documentclass{article}
\pagestyle{empty}
\usepackage{pst-pdf,pstricks,multido}

\begin{document}
\multido{\r=1.0+-0.1}{11}{%
\pspicture(2,2)
  \pscircle*[linecolor=red,opacity=0.5](1,1){\r}
\endpspicture}}

\end{document}

latex <file>
dvips <file>
ps2pdf <file>.ps

then create a new document and use with pdflatex \animategraphics[controls,loop]{5}{<file>}{}{}. Here is an example of such a document: http://latex.userpage.fu-berlin.de/animate.pdf`

share|improve this answer
    
I will test it now. Whether it is what I am looking for. –  xport Aug 17 '11 at 12:33
    
I think I don't need pst-pdf because it internally invokes preview. –  xport Aug 17 '11 at 13:07
    
but then you have to use \PreviewEnvironment{pspicture} –  Herbert Aug 17 '11 at 13:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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