2

Following pstricks code I found a while back compiles just fine with TeX Live 2013:

\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{pst-plot}
\psset{unit=2cm,dimen=m}
\newdimen\Width\Width=3.64159265\psxunit

\begin{document}
\multido{\i=0+10}{19}{%
\begin{pspicture}(-.5,-.2)(\Width,1)
    \psaxes[yAxis=false](0,0)(-.5,0)(\Width,0)
    \multips(.5,.5)(1,0){3}{\pscircle[linecolor=cyan!20]{.5}}
    \pstVerb{/length {\i\space DegtoRad} def /angle {\i\space .5 div 90 add neg} def}
    \rput(!length .5){\psline{->}(!.5 angle PtoC)}
    \ifnum\i=180\color{red}\psxTick[labelsep=1pt](3.14159265){\pi}\fi
    \psset{linewidth=2pt}
    \pscircle(!length .5){.5}
    \psline[linecolor=red](!length 0)
    \psarcn[linecolor=red](!length .5){.5}{-90}{!angle}
\end{pspicture}}
\end{document}

But I just updated to TeX Live 2017, and now I get:

$ xelatex pi.tex
This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./pi.tex
LaTeX2e <2017-04-15>
Babel <3.15> and hyphenation patterns for 84 language(s) loaded.

...

Overfull \hbox (170.7165pt too wide) detected at line 18
[] [] [] []
[1]

repeated 15 times, followed by

[15]
Overfull \hbox (170.7165pt too wide) detected at line 18
[] [] [] []
[16Error: /typecheck in --moveto--
Operand stack:
   --nostringval--   0.0   -28.4527   0.0   -28.4527   0   0   ()
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   2015   1   3   %oparray_pop   2014   1   3   %oparray_pop   1998   1   3   %oparray_pop   1884   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:989/1684(ro)(G)--   --dict:1/20(G)--   --dict:166/200(L)--   --dict:126/200(L)--
Current allocation mode is local
Current file position is 2465
GPL Ghostscript 9.22: Unrecoverable error, exit code 1
Error: /typecheck in --moveto--

...

--dict:130/200(L)--
Current allocation mode is local
Current file position is 2321
GPL Ghostscript 9.22: Unrecoverable error, exit code 1
(see the transcript file for additional information)
Output written on pi.pdf (19 pages).
Transcript written on pi.log.
$

Anyone have any idea if the code is just wrong or there is a regression in pstricks package (or elsewhere)?

4

That also didn't worked in the past. /length cannot be defined, it is a reserved PostScript function name! Use something similiar, eg /Length:

\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{pst-plot}
\psset{unit=2cm,dimen=m}
\newdimen\Width\Width=3.64159265\psxunit

\begin{document}
    \multido{\i=0+10}{19}{%
        \begin{pspicture}(-.5,-.2)(\Width,1)
        \psaxes[yAxis=false](0,0)(-.5,0)(\Width,0)
        \multips(.5,.5)(1,0){3}{\pscircle[linecolor=cyan!20]{.5}}
        \pstVerb{/Length {\i\space DegtoRad} def /angle {\i\space .5 div 90 add neg} def}
        \rput(!Length .5){\psline{->}(!.5 angle PtoC)}
        \ifnum\i=180\color{red}\psxTick[labelsep=1pt](3.14159265){\pi}\fi
        \psset{linewidth=2pt}
        \pscircle(!Length .5){.5}
        \psline[linecolor=red](!Length 0)
        \psarcn[linecolor=red](!Length .5){.5}{-90}{!angle}
        \end{pspicture}}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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