# Trouble getting started with pstricks [duplicate]

I went to the self-advertized pstricks web site,

http://tug.org/PSTricks/main.cgi?file=examples

and tried to run a few examples in TeXShop version 3.51 on Mac OSX Yosemite. The examples I tried are cycloid.tex, game0.tex, and curve0.tex. These appear to be self-contained, syntactically complete examples, but they all fail with similar error messages

! Undefined control sequence.

l.82      dAngle=90,nAngle=4](0,0)(0,360){1}{1}{1}


suggesting that \c@lor@to@ps is not defined properly somewhere in the pstricks stack. I thought rather than go down the rabbit hole of trying to debug this, I'd ask the community, because it appears that something systematic and cosmic is wrong, either with the distribution of pstricks in TeXShop / MacTeX / TeXlive, or perhaps pstricks is just dead, being replaced by Tikz? I don't know. BTW, fails with the same kinds of error messages at the console with pdflatex

pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014)
kpathsea version 6.2.0
Compiled with libpng 1.6.10; using libpng 1.6.10
Compiled with zlib 1.2.8; using zlib 1.2.8

• you need to use latex not pdflatex for pstricks. – David Carlisle Jun 25 '15 at 12:56
• At tex.stackexchange.com/questions/68870/…, Bernard points out (I cannot confirm) that "There is another solution : you can use pdfLaTeX with pstricks, provided pdflatex is launched with one of these switches: --enable-write18 (MiKTeX) or --shell-escape (TeXLive), and you load pstricks with the pdf option." – Steven B. Segletes Jun 25 '15 at 13:10

Ok, looks like the required incantations are

latex cycloid.tex
dvips cycloid.dvi
open cycloid.ps


That opens Mac Preview, and I can manually save the PostScript file as a PDF.

The final step can be automated with ps2pdf, which, I believe is part of the GhostScript distribution.

or, using homebrew on the mac

brew install ghostscript


dvipdfm did not work for me (it was suggested in several postings)

• Install Ghostscript and run ps2pdf cycloid.ps. – AlexG Jun 25 '15 at 13:24
• dvipdfm[x] doesn't work because it is incompatible with PsTricks. – AlexG Jun 25 '15 at 13:26
• run your PSTricks code with xelatex. It should work in nearly all cases – user2478 Jun 25 '15 at 16:21