Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Actually I don't want to use auto-pst-pdf forever. But Harish Kumar (in his comment) requested to use it for the sake of simplicity. I tried it several decades ago and it did not work. The MWE below is the example I tried and failed.

\documentclass[pstricks]{standalone}
\usepackage{pst-plot}
\usepackage{auto-pst-pdf}
\psset
{
    unit=\psrunit,
    polarplot,
    algebraic=true,
    plotpoints=1000,
}

\begin{document}
\multido{\i=1+1}{25}{%
\begin{pspicture}(-3,-3)(3,3)
\pscircle[linestyle=dashed](0,0){2}
\psplot[linecolor=red]{0}{TwoPi}{2+.5*cos(\i*x)}
\end{pspicture}}
\end{document}
share|improve this question
    
it compiles fine if you change standalone to article; as such, perhaps add the standalone tag to your question –  cmhughes Nov 18 '12 at 1:51
    
@cmhughes: the tag has been added. Thanks. –  stalking is prohibited Nov 18 '12 at 1:52
2  
several decades ago... Just how old are you really? ;) –  hpesoj626 Nov 19 '12 at 8:42
1  
What error message do you actually get? (I got The program 'pdflatex' is currently not installed. but that's a different reason ;-) ) –  Martin Scharrer Nov 19 '12 at 21:37
1  
One workaround to use pstricks in pdflatex mode is to \usepackage[pdf]{pstricks}. So,auto-pst-pdf is automatically included, thereby pstricks in the standalone document class options can be removed. Finally preamble looks like \usepackage[pdf]{pstricks} would come first, then add ons \usepackage{pst-plot} and no need for \usepackage{auto-pst-pdf}. This works well for me.BTW if you kindly post 'confusing error message' in the question it would help others. –  texenthusiast Dec 30 '12 at 4:32

2 Answers 2

up vote 6 down vote accepted

the documentclass standalone cannot work together with the auto-pst-pdf package and the [pstricks] option for standalone. Use

\documentclass{standalone}
\usepackage{pst-plot}
\usepackage{auto-pst-pdf}
\psset{%
    polarplot,
    algebraic,
    plotpoints=1000}

\begin{document}
\multido{\i=1+1}{25}{%
  \begin{pspicture}(-3,-3)(3,3)
  \pscircle[linestyle=dashed](0,0){2}
  \psplot[linecolor=red]{0}{TwoPi}{2+.5*cos(\i*x)}
\end{pspicture}}
\end{document}

However, it makes no sense to use standalone and auto-pst-pdf together.

share|improve this answer
    
I fully agree with the last sentence. –  Martin Scharrer Jan 1 '13 at 10:53

As Herbert already mentions in his answer, the pstricks option of standalone doesn't work with auto-pst-pdf. Both seem to redefine the pspicture environment in an incompatible way. This makes perfectly sense because both try to due basically the same thing: create one page for every pspicture.

In order to make both work together remove the pstricks option (which loads pstricks and sets pspicture as a "multi environment") and add an additional environment to let standalone create multiple pages:

\documentclass[multi=multipage]{standalone}
\usepackage{pst-plot}
\usepackage{auto-pst-pdf}
\psset{%
    polarplot,
    algebraic,
    plotpoints=1000}

\begin{document}
\multido{\i=1+1}{25}{%
  \begin{multipage}
  \begin{pspicture}(-3,-3)(3,3)
    \pscircle[linestyle=dashed](0,0){2}
    \psplot[linecolor=red]{0}{TwoPi}{2+.5*cos(\i*x)}
  \end{pspicture}
  \end{multipage}
}
\end{document}

However, in this case file.pdf is basically identical to file-pics.pdf anyway and therefore you don't need to use standalone at all. Simply use a document like this and use file-pics.pdf directly. I assume here that what you want it a multi-page PDF which contains one step at every page.

\documentclass{article}
\usepackage{pst-plot}
\usepackage{auto-pst-pdf}
\psset{%
    polarplot,
    algebraic,
    plotpoints=1000}

\begin{document}
\multido{\i=1+1}{25}{%
  \begin{pspicture}(-3,-3)(3,3)
    \pscircle[linestyle=dashed](0,0){2}
    \psplot[linecolor=red]{0}{TwoPi}{2+.5*cos(\i*x)}
  \end{pspicture}
}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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