I'm trying to represent a polytope, but it seems that GhostScript doesn't let me slice a cube more than once. In particular, I tried the following:

\psset{viewpoint=150 -110 10 rtp2xyz,Decran=120} 
  \psSolid[object=cube,action=none,a=10,plansepare={[1 1 1 -3]},name=A](5,5,5)
  \psSolid[object=load,load=A0,plansepare{[1 1 0 -2]},action=none,name=B]

The above code compiles but of course shows only the result from the first cut. If I replace the last \psSolid line with


then GhostScript fails and gives me the following error:

Output written on dual_example.dvi (1 page, 36936 bytes).
SyncTeX written on dual_example.synctex.gz.
Transcript written on dual_example.log.
### /usr/texbin/dvips -R -Poutline  -o /tmp/altpdflatex.14198-1361245018/dual_example.ps dual_example.dvi
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
' TeX output 2013.02.18:1936' -> /tmp/altpdflatex.14198-1361245018/dual_example.ps
### ps2pdf13 /tmp/altpdflatex.14198-1361245018/dual_example.ps /tmp/altpdflatex.14198-1361245018/dual_example.pdf
Error: /undefined in B0
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1894   1   3   %oparray_pop   1893   1   3   %oparray_pop   1877   1   3   %oparray_pop   1771   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1157/1684(ro)(G)--   --dict:0/20(G)--   --dict:113/200(L)--   --dict:751/1012(L)--   --dict:182/300(L)--   --dict:38/200(L)--   --dict:203/300(L)--   --dict:751/1012(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 419337
GPL Ghostscript 9.05: Unrecoverable error, exit code 1
### FAILED to generate /tmp/altpdflatex.14198-1361245018/dual_example.pdf ()

Can anyone please tell me what I'm doing wrong?

  • This question appears to be off-topic because it is about an issue which cannot be reproduced with an up-to-date TeX system.
    – Joseph Wright
    Aug 8, 2013 at 7:54
  • I've just tested this with TeX Live 2013 on Windows and everything looks OK. I'd say this is a version issue, probably a bug in GhostScript, so updating would be my advice.
    – Joseph Wright
    Aug 8, 2013 at 7:55
  • Sorry for the very late reply – somehow my email notifications don't seem to work. Anyways, I have updated my TeX Live to 2013 as well and am assuming I have the latest GhostScript since I just bought a new MacBook pro – but the problem persists. According to the console output (which is too long to print), I have TeX Live 2013 and GhostScript 9.07, on a Mac OSX 10.9 (in TeXShop).
    – mimuller
    Nov 22, 2013 at 22:23


Browse other questions tagged .