TransWikia.com

Compilation error after texlive update

TeX - LaTeX Asked on May 15, 2021

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:

documentclass[beamer,pstricks,preview=true]{standalone}

standaloneenv{{pspicture}}

psset{unit=2cm}
begin{document}
begin{standaloneframe}
  begin{pspicture}[showgrid=bottom](-5,-5)(5,5)
    psdot(0,0)
    only<2>{psdot(1,1)}
  end{pspicture}
end{standaloneframe}
end{document}

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)--   
--dict:173/300(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 ?

One Answer

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:

documentclass[beamer,pstricks,preview=false]{standalone}

geometry{paperheight=20cm,paperwidth=20cm,left=0cm,right=0cm,bottom=0cm,top=0cm}

psset{unit=2cm}
begin{document}
begin{standaloneframe}%
  begin{pspicture}[showgrid=bottom](-5,-5)(5,5)
    psdot(0,0)
    only<2>{psdot(1,1)}
  end{pspicture}%
end{standaloneframe}
end{document}

Correct answer by Adam B. on May 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP