I used to make animated pictures using pstricks and the beamer overlay syntax (eg. using \only<2>{<some pstricks code>}) with the standalone class.

Here a MWE which did the work:




This MWE does compile with texlive2013 (iso-version) with latex -> dvips -> ps2pdf: a pdf with two pages and just the pspictures environment correctly croped. HOWEVER it does not compile with a fully updated texlive2013 distribution, the conversion from ps to pdf fails with the following message:

Error: /typecheck in --div--
Operand stack:

   1   1   0.0   0.0   a   65781.8

Execution stack:

   %interp_exit   .runexec2   --nostringval--   --nostringval--   
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--   
--nostringval--   false   1   %stopped_push   1910   1   3   %oparray_pop   
1909   1   3   %oparray_pop   1893   1   3   %oparray_pop   1787   1   3   
%oparray_pop   --nostringval--   %errorexec_pop   .runexec2   
--nostringval--   --nostringval--   --nostringval--   2   %stopped_push   
--nostringval--   --nostringval--   --nostringval--   --nostringval--   4   
--nostringval--   %repeat_continue   --nostringval--

Dictionary stack:

   --dict:1168/1684(ro)(G)--   --dict:0/20(G)--   --dict:127/200(L)--   

Current allocation mode is local

Last OS error: 2

Current file position is 101382

GPL Ghostscript 9.05: Unrecoverable error, exit code 1

This code does compile by removing the preview package but the result is not what is expected. I also tried to active preview with the option of the standalone package but this is also without effect.

Does someone know how to resolve this problem, or how to modify the MWE so that it compiles and give the right output ?

  • Why do xou need the standalone class for the presentation?
    – user2478
    Commented May 22, 2014 at 7:10
  • It's not for a presentation, I use this combination to create animated pictures without needing to copy the whole body for each picture. But now that you say it, I may actually not have to use the standalone class to do it.
    – Adam B.
    Commented May 22, 2014 at 7:18

1 Answer 1


So, after a lot of try and errors, I've couldn't find out why this code no longer works with an updated TexLive distribution. However I've found a workaround.

It seems that somehow the preview package and pstricks do not come along together anymore. So the workaround is to deactivate the preview option of the standalone package. That way there is no compilation errors anymore, but the result is not what is expected. Indeed the standaloneframe environment kind of override the directive \standaloneenv{{pspicture}} so that the crop is done to the dimensions of the standaloneframe and not to the dimensions of the pspicture. Using the geometry package allows to set the dimensions of the standonealoneframe so that they match the dimensions of the pspicture resolves the problem:



  • This hack with \geometry may not be the best solution. Commented May 21, 2021 at 19:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .