[pstricks] Question about unit in pstricks
Peter Staab
peter.staab at gmail.com
Fri Oct 14 22:08:26 CEST 2005
I ran into a problem converting the ps to pdf in a latex file using vectors
fields and have finally nailed down the problem.
The following problem is closely related to the vector field code on the
pstricks web site. If I set the parameter unit using:
\pset{unit=0.5cm}
where the unit is 0.5cm I get a error: "/invalidrestore in --restore-- "
(see below). If I set the unit to 1cm or larger it is fine. A guess of the
problem is the following: since the code uses raw postscript, there might be
an issue in scaling.
I should also mention that there must be two pspicture environments for this
to fail. If I run the code on just one pspicture environment, there is no
error in converting the ps to pdf.
If anyone has any ideas on this, it would be quite helpful.
Thanks in advance,
Peter Staab
I have included first the output of a run and then the code:
### This is /usr/local/teTeX/bin/powerpc-apple-darwin-current/altpdflatex,
Version $Revision: 2.18 $
### /usr/local/teTeX/bin/powerpc-apple-darwin-current/latex test2.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./test2.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german,
ngerman, d
utch, italian, norsk, portuges, spanish, swedish, nohyphenation, loaded.
(/usr/local/teTeX/share/texmf.tetex/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/local/teTeX/share/texmf.tetex/tex/latex/base/size10.clo))
(/Users/peter/Library/texmf/tex/latex/pst-plot.sty
(/Users/peter/Library/texmf/tex/latex/pstricks.sty
(/Users/peter/Library/texmf/tex/latex/pstricks.tex
`PSTricks' v1.10 <2005/08/13> (tvz)
(/usr/local/teTeX/share/texmf.tetex/tex/generic/pstricks/pstricks.con))
(/usr/local/teTeX/share/texmf.tetex/tex/latex/xcolor/xcolor.sty
(/usr/local/teTeX/share/texmf.tetex/tex/latex/graphics/color.cfg)
(/usr/local/teTeX/share/texmf.tetex/tex/latex/graphics/dvips.def)))
(/Users/peter/Library/texmf/tex/latex/pst-plot.tex v97 patch 2, 1999/12/12
(/usr/local/teTeX/share/texmf.tetex/tex/generic/multido/multido.tex
v1.41, 2004/05/18 <tvz>))) (./test2.aux) [1] (./test2.aux)
*File List*
article.cls 2004/02/16 v1.4f Standard LaTeX document class
size10.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
pst-plot.sty 2004/07/15 package wrapper for pst-plot.tex
pstricks.sty 2004/05/12 v0.2l LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex 2005/08/13 v1.10 `PSTricks' (tvz)
xcolor.sty 2004/07/04 v2.00 LaTeX color extensions (UK)
color.cfg 2005/02/03 v1.3 color configuration of teTeX/TeXLive
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pst-plot.tex 2004/05/18 1.41 `pst-plot' (tvz)
***********
)
Output written on test2.dvi (1 page, 146756 bytes).
Transcript written on test2.log.
### /usr/local/teTeX/bin/powerpc-apple-darwin-current/dvips -R -Poutline -o
/tmp/altpdflatex.4451-1129320130/test2.ps test2.dvi
This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (
www.radicaleye.com <http://www.radicaleye.com>)
' TeX output 2005.10.14:1602' -> /tmp/altpdflatex.4451-1129320130/test2.ps
<tex.pro <http://tex.pro>><pstricks.pro
<http://pstricks.pro>><pst-dots.pro<http://pst-dots.pro>
><texps.pro <http://texps.pro>><special.pro
<http://special.pro>><color.pro<http://color.pro>>.
<cmsy10.pfb><cmr10.pfb>[1]
### ps2pdf13 /tmp/altpdflatex.4451-1129320130/test2.ps
/tmp/altpdflatex.4451-1129320130/test2.pdf
Error: /invalidrestore in --restore--
Operand stack:
1426 5 (5) 1329 2583 5 (5) 1329 2583 5 (1) 1217 2373 5 (2) 1217 2255 5 (3)
1217 2137 5 (4) 1217 2019 5 (5) 1329 2583 5 (1) 1153 2842 5 (2) 1153 2960 5
(3) 1153 3078 5 (4) 1153 3196 5 (5) 1329 2583 5 --nostringval--
--nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2
%stopped_push --nostringval-- --nostringval-- --nostringval-- false 1
%stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3
%oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2
%stopped_push --nostringval-- --nostringval-- 51 4 %oparray_pop
--nostringval-- 51 4 %oparray_pop --nostringval--
Dictionary stack:
--dict:1120/1686(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)--
--dict:179/300(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 198584
AFPL Ghostscript 8.51: Unrecoverable error, exit code 1
### FAILED to generate /tmp/altpdflatex.4451-1129320130/test2.pdf ()
-----------CODE BELOW--------
%!TEX TS-program = latex
\listfiles
\documentclass[a4paper]{article}
\usepackage{pst-plot}
\begin{document}
%% if this is above 1cm no problems:
\psset{unit=0.5cm}
\SpecialCoor% importanmt for all examples
\begin{pspicture}(-6,-6)(6,6)
\psaxes{<->}(0,0)(-6,-6)(6,6)
\psset{arrows=->}
\multido{\ia=-5+1}{11}{%
\multido{\ib=-5+1}{11}{%
\pstVerb{/x \ia\space def
/y \ib\space def
y 0 eq
{/ValueTempA 0 def
/ValueTempB 0.5 def}
{/ValueTempZ 10 def
/ValueTempA y ValueTempZ div def
/ValueTempB x neg ValueTempZ div def}
ifelse}
\psline(! x ValueTempA sub y ValueTempB sub)
(! x ValueTempA add y ValueTempB add)}}
\end{pspicture}
\begin{pspicture}(-6,-6)(6,6)
\psaxes{<->}(0,0)(-6,-6)(6,6)
\psset{arrows=->}
\multido{\ia=-5+1}{11}{%
\multido{\ib=-5+1}{11}{%
\pstVerb{/x \ia\space def
/y \ib\space def
y 0 eq
{/ValueTempA 0 def
/ValueTempB 0.5 def}
{/ValueTempZ 2 1 x x mul y y mul div add sqrt mul def
/ValueTempA 1 ValueTempZ div def
/ValueTempB x neg y ValueTempZ mul div def}
ifelse}
\psline(! x ValueTempA sub y ValueTempB sub)
(! x ValueTempA add y ValueTempB add)}}
\end{pspicture}
\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20051014/fa8b3e70/attachment.html
More information about the PSTricks
mailing list