[pstricks] bug in pstricks

Alan Ristow ristow at ece.gatech.edu
Sat Apr 3 19:36:28 CEST 2004


I can confirm -- no problems with these definitions of \tx at MSave and
\tx at MRestore, but I comment them out and have problems. Just to be clear
about the nature of the error, LaTeX handles your example just fine in
both cases. The problem arises when I convert the .dvi to .ps and try to
open the .ps document with GSView. Is this the error you were expecting?

alan


On Sat, 03 Apr 2004 19:14:30 +0200, Herbert Voss
<Herbert.Voss at alumni.TU-Berlin.DE> wrote:

>Could someone please so kind and confirm a bug
>in pstricks with \msave and \mrestore?
>
>The example only works with the redefinition
>of \def\tx at MSave  and \def\tx at MRestore. Delete
>this stuff and you should get an error.
>
>Herbert
>
>
>\documentclass[12pt]{article}
>\usepackage{pst-plot}
>
>\makeatletter
>\def\tx at MSave{%
>     /msavematrx
>         [ tx at Dict /msavematrx known % does msavematrix exists?
>             { msavematrx aload pop } if
>             CM % matrix currentmatrix
>         ]
>     def
>     msavematrx % missing in pstricks
>}
>\def\tx at MRestore{% atypo in pstricks with msavematrx
>     tx at Dict /msavematrx known { length 0 gt } { false } ifelse
>         { msavematrx aload pop setmatrix } if
>}
>\makeatother
>
>\begin{document}
>
>   \begin{pspicture}(3,4)
>     \psgrid[subgriddiv=0,gridcolor=lightgray]
>     \pscustom{%
>       \translate(0,1.5)
>       \psplot{0}{3}{x 180.0 mul 1.5 div sin}%
>       \msave
>         \translate(1,2)
>         \scale{1 0.5}
>         \psplot[liftpen=2]{-1}{2}{x 180.0 mul 1.5 div sin}
>       \mrestore
>       \psplot[liftpen=2]{0}{3}{x 180.0 mul 0.5 div cos}
>     }
>   \end{pspicture}
>
>\end{document}





More information about the PSTricks mailing list