1

I got this error

! Undefined control sequence.
<recently read> \c@lor@to@ps 

l.122 }

?

on compiling a TeX file which has a code copied from LaTeX Draw.

This mysterious error has remained so for two days or so! Now I have some time to attend to it.

Here is a screenshot showing the LaTeX code fragment:

% Generated with LaTeXDraw 2.0.8
% Wed Oct 02 09:43:45 IST 2013
% \usepackage[usenames,dvipsnames]{pstricks}
% \usepackage{epsfig}
% \usepackage{pst-grad} % For gradients
% \usepackage{pst-plot} % For axes
\scalebox{1} % Change this value to rescale the drawing.
{
\begin{pspicture}(0,-2.7)(9.84,2.7)
\psline[linewidth=0.04cm](0.32,-1.1)(5.46,1.72)
\psline[linewidth=0.04cm](1.94,1.7)(6.1,-2.54)
\psline[linewidth=0.04cm](4.7,2.64)(3.2,-2.68)
\psline[linewidth=0.04cm](0.0,1.26)(9.82,-1.84)
\psline[linewidth=0.04cm](3.5,2.68)(2.96,-2.5)
\end{pspicture} 
}

I ensured that the packages that were commented in the code are included:

My question: How to correct this? It's hard to figure out, for I never wrote \c@lor@to@ps anywhere and didn't find it in the code fragment copied from LaTeX Draw either!

Thanks in advance for any help!

  • 1
    Welcome to TeX.SX!. Instead of posting images of your code, please post the code itself. – karlkoeller Oct 2 '13 at 4:53
  • Thanks :-) That worked. I was trying running it using PDFLatex. – Karthik C Oct 2 '13 at 5:02