# How to run PSTricks in TeXShop

Why can't I run the following command in my TeXShop?

\documentclass{article}

\begin{document}
\psset{algebraic=true}
\pspicture(-2,-0.5)(2,2)
\psline{<->}(-2,0)(2,0)
\psline{->}(0,-0.5)(0,2)
\psplot{-1.5}{1}{x*x+x}
\endpspicture
\end{document}

-
Compile it with xelatex or latex->dvips->ps2pdf. – kiss my armpit Aug 6 '12 at 12:37

% !TEX TS-program = latex

as the first line of your document. (This line can be generated by TeXShop by choosing the Program item from the Macros menu, and choosing latex from the list provided by the macro.)