[OS X TeX] First tries with PSTricks

Daniel Becker daniel.becker at uni-rostock.de
Thu Jan 29 14:07:56 EST 2009


Am 29.01.2009 um 19:15 schrieb Scott, Randy:

> which I think means that pstricks is loaded properly. But when I  
> type even the simplest of commands, say \psline(1,1)(3,2) , I get an  
> error message : undefined control sequence
>
> This happens whether I include the command inside a pspicture  
> environment or not.

In TexShop, make sure that you are typesetting in the "ghostscript/dvi- 
mode", not pdftex. See help -> basis -> alternate typesetting mode.  
See http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput for the  
background.

If you prefer to use pdf(la)tex, you could try pdftricks, see the  
example below.

Hope this helps

Daniel

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc} %encoding

\usepackage{ifpdf}
\ifpdf%
        \usepackage{pdftricks}

        \begin{psinputs}
            \usepackage{pstricks}
            \usepackage{pstricks-add}
            \usepackage{pst-plot}
            \usepackage{pst-text,pst-node,pst-tree}
        \end{psinputs}
\else
        \usepackage{pstricks}
        \usepackage{pstricks-add}
        \usepackage{pst-plot}
        \usepackage{pst-text,pst-node,pst-tree}

\fi

\begin{document}

\pagestyle{empty}

\begin{pdfdisplay}
\begin{pspicture}(-1,-1)(10,12)
\psgrid[subgriddiv=1,griddots=10,gridlabels=10pt](-2,-2)(10,12)
\psaxes[labels=none,ticks=none,linewidth=0.2mm,Dx=10,Dy=10]{->}(0,0) 
(10,12)
%Text
\put(1,19){\makebox(0,0)[cc]{Hallo}}
%Linie
\psline[showpoints=false,linestyle=dashed,dash=2mm 2mm]{-}(1,3)(6,6)
\end{pspicture}
\end{pdfdisplay}



\end{document}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4647 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20090129/a02f6648/attachment.p7s>


More information about the MacOSX-TeX mailing list