5

I've noticed a problem with the latest version of pstricks: I used to compile files containing pstricks code with pdflatex, using the pdf option of the document class. Now it doesn't work,, and produces an error:

                                              %
! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@
                                                  \else \expandafter \expand...
l.15 ...lor =IndianRed ]{0}{TwoPi}{0.5 + 2*cos(x)}
                                                  %
[1 Non-PDF special ignored! Non-PDF special ignored! Non-PDF special
ignored! Non-PDF special ignored! Non-PDF special ignored! Non-PDF
special ignored! Non-PDF special ignored! Non-PDF special ignored!

exactly as though auto-pst-pdf were not loaded. Loading auto-pst-pdf explicitly in the preamble, at the right place, solves the problem, but this means all files with pstricks code will have to be modified.

Does anyone know where this problem comes from, and if there is a solution?

Minimal working example:

\documentclass[11pt, a4paper, pdf, svgnames]{standalone}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{fourier}
    \usepackage{ pst-plot}
% \usepackage{auto-pst-pdf}
\begin{document}

\psset{unit=2.5cm, arrowinset=0.15, ticksize=2.5pt -2.5pt, labelFontSize=\footnotesize, tickwidth =0.6pt}
\begin{pspicture}(-1.5,-1.9)(3.9,1.9)
    \psaxes[arrows=->, linecolor=LightSteelBlue, tickcolor=LightSteelBlue] (0,0)(-1.6,-1.9)(3.6,1.9)[$x$,-110][$y$,-140]
    \psset{linewidth=1.2pt, plotpoints=200, plotstyle=curve, polarplot, algebraic, labelsep=0.5em}
    \psplot[linecolor =IndianRed ]{0}{TwoPi}{0.5 + 2*cos(x)}%
\end{pspicture}

\end{document}
2

With pstricks.sty and pstricks.tex this will work with

pdflatex --shell-escape exa.tex

Edit: It will change in the next few days: instead of using the option pdf, you should load package pstricks-pdf. I'll upload it before weekend.

The example code:

\documentclass[11pt, a4paper, pdf, svgnames]{article}
\usepackage{fourier}
\usepackage{pst-plot}
\begin{document}

\psset{unit=2.5cm}
\begin{pspicture}[showgrid](-1,-2)(3,2)
\psset{linewidth=2pt, plotpoints=200, plotstyle=curve, polarplot, algebraic, labelsep=0.5em}
\psaxes[arrows=->,linewidth=0.5pt,labels=none,gridstyle=](0,0)(-1,-2)(3,2)[$x$,-110][$y$,-140]
\psplot[linecolor=blue]{0}{TwoPi}{0.5 + 2*cos(x)}%
\end{pspicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.