I know this issue has been discussed a lot in other topics, but most of them contain complex examples, from which I haven't been able to understand the solution. So I have the following code:
\documentclass{article}
\usepackage[pdf]{pstricks}
%\usepackage[usenames,dvipsnames]{pstricks}
\begin{document}
\begin{pspicture}(0,-0.8)(2.0,0.8)
\psline[linewidth=0.04cm](0.0,0.78)(1.98,-0.78) \end{pspicture}
\end{document}
I keep getting the error message: Undefined control sequence. What am I doing wrong? (I'm using texmaker in ubuntu).


pdflatexorlatex-dvips-ps2pdforxelatex? – kiss my armpit Nov 04 '13 at 21:06pdflatex -shell-escape inputfilename.tex? – kiss my armpit Nov 04 '13 at 21:09pdflatex -shell-escape YourFile. The extensiontexis not necessary. – Przemysław Scherwentke Nov 04 '13 at 22:32