Let us consider the following example :
\documentclass[12pt,twoside,a4paper]{book}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
\begin{document}
\scalebox{1} % Change this value to rescale the drawing.
{
\begin{pspicture}(0,-0.02)(2.68,0.02)
\psline[linewidth=0.04cm](0.0,0.0)(2.66,0.0)
\end{pspicture}
}
\end{document}
Whenever I compile this code with kile in Ubuntu14.04 shows four errors :
Undefine control sequence }
Undefine control sequence }
Undefine control sequence }
Undefine control sequence }
But I don't know why such errors are occurring. Please help.
epsfigand usegraphicxinstead. – Werner Feb 07 '15 at 17:18\c@lor@to@psby default pstricks only works with latex not pslatex, use latex and the error will go. Don't useepsfig!! – David Carlisle Feb 07 '15 at 18:00pdflatex, load theauto-pstpdfpackage (or add thepdfoption to pstricks options) and compile with the--enable-write18switch fore MiKTeX, or-shell-escapefor TeX Live or MacTeX. – Bernard Feb 07 '15 at 18:09xelatexinstead ofpdflatex– Feb 07 '15 at 19:20pdflatexto any unused filename and rename yourxelatextopdflatex. – kiss my armpit Feb 08 '15 at 02:20