[pstricks] pstVerb and mirror effect problem

Herbert Voss Herbert.Voss at FU-Berlin.DE
Tue Dec 22 09:40:27 CET 2009


Am 22.12.2009 06:08, schrieb mathias legrand:

> I'm starting to have a look at pstVerb and facing a strange situation.
> When I compile what is below, there is a mirror problem about the
> horizontal axis
> (in simple words, everything is upside down):
> 
> I took the code from:
> 
> http://www.math.ubc.ca/~cass/graphics/text/www/pdf/ch1.pdf
> and the red book as well.

\pstVerb writes PostScript code without using any PSTricks
settings. The origin in TeX is 1in 1in from the left top, but
in PS it is on the lower left.

> \begin{pspicture}(0,0)(5,5)
> \pstVerb{

it makes no sense usinf a pspicture environemnt when writing
\pstVerb code. to get it in the right direction you have
to put

1 -1 scale

> % 9 setlinewidth
> 1 setlinejoin
...

However, usinbg \pscustom with \code makes more sense.

\documentclass{minimal}
\usepackage{pstricks}
\pagestyle{empty}

\begin{document}

\begin{pspicture}[showgrid=true](0,0)(5,5)
\pscustom[linewidth=2pt]{%
  \code{
    1 setlinejoin
    newpath
    0 0 moveto
    0 150 lineto
    150 0 lineto
    clip
    /Helvetica findfont 80 scalefont setfont
    20 0 moveto
    (ABC) false charpath}
}
\end{pspicture}

\end{document}


Herbert


More information about the PSTricks mailing list