[pstricks] PSTtoEPS psclip error

Ewan Todd ewan at mathcode.net
Wed Dec 1 07:48:11 CET 2004


Herbert,

> I had no problems here, but you should use the package ps4pdf, it
> makes life easier. With the script and the config file from
> http://perce.de/LaTeX/ps4pdf you can insert \savePics at the end of
> the doc to get _all_ PSforPDF environments as pictureXX.eps. At
> least you get a file <filename>-pics.pdf.

> I played a bit with your code. multido is a nice tool.

thanks for the multido stuff.  I had to do some package shuffling to
get pdflatex set up.  I saved a shell script for the fbsd TeX upgrade
if anyone is interested.  The original PSTtoEPS problems persist.

Below are a diff and new file for the spiral figure (representing the
original intent!)  The pstextpath lines could be rendered in cycles,
so that pi (aka 180º) is 0.5, and the start of the third spiral is 3.0.

-e


_____________________________________
diff:


46c48
<      \psclip{ \pscustom[linestyle=none]{\gSP{180}{360}} }%
---
>      \psclip{ \pscustom[linestyle=none]{\gSP{360}{540}} }%
50c52
<      \psclip{ \pscustom[linestyle=none]{\gSP{0}{180}} }%
---
>      \psclip{ \pscustom[linestyle=none]{\gSP{180}{360}} }%
55c57
<      \multido{\iA=0+180,\iB=180+180}{9}{\gSP{\iA}{\iB}}
---
>      \multido{\iA=180+180,\iB=360+180}{8}{\gSP{\iA}{\iB}}


_____________________________________________
update:


\documentclass[letterpaper,12pt]{article} % could be (eg) article or report
\usepackage{ps4pdf}
\usepackage{multido}
\PSforPDF{
   \usepackage{pst-all}
}
\usepackage{graphicx}
\newsavebox\PSTBox
\PSforPDF{
\savebox\PSTBox{%
   \begin{pspicture}(-5.5,-5.5)(5,5)
     \psset{unit=2.0in}%
     \psset{subgriddiv=20}%
%     
     \def\Euler{2.718 }%
     \def\Scale{-0.01 }%
     \def\Pi{3.1415 }%
     \def\Radian{180 div \Pi mul }%
     \def\spiral{ 1 9 \Pi mul div t \Radian mul t cos mul
                 -1 9 \Pi mul div t \Radian mul t sin mul }%
%		 
     \def\gSP#1#2{\parametricplot[plotstyle=curve]{#1}{#2}{\spiral}}%
     \def\f{\gSP{180}{1620}}% pi / 2 to 9 pi / 2
%     
     \multido{\iA=1440+-180,\iB=1620+-180,\iC=0+1}{6}{%
       \psclip{\pscustom[linestyle=none]{\gSP{\iA}{\iB}}}%
         \psframe*[linecolor=%
	  \ifcase\iC green\or green\or yellow\or yellow\or red\or red\fi](-1,-1)(1,1)
       \endpsclip
     } % end multido
%     
     \psline(.88889,0)(-.7778,0)
     \psline(-.4815,-.834)(.42953,.73773)
     \psline(.46296,-.8019)(-.4074,.70565)
     {\Large%
      \pstextpath[c](-0.86,0.05){\gSP{1260}{1440}}{Planning}%
      \pstextpath[c](0,0.05){    \gSP{1260}{1440}}{Low Level}%
      \pstextpath[c](0.86,0.05){ \gSP{1260}{1440}}{Mid Level}%
%      
      \pstextpath[c](-0.99,0.05){\gSP{1440}{1620}}{High Level}%
      \pstextpath[c](-0.05,0.05){\gSP{1440}{1620}}{Testing}%
      \pstextpath[c](0.99,0.05){ \gSP{1440}{1620}}{Documentation}%
%      
      \pstextpath[l](0.1,-0.125){\gSP{540}{720}}{Cycle One $\longrightarrow$}%
      \pstextpath[l](0.1,-0.125){\gSP{900}{1080}}{Cycle Two $\longrightarrow$}%
      \pstextpath[l](0.1,-0.125){\gSP{1260}{1440}}{Cycle Three $\longrightarrow$}%
     }%
     \psclip{ \pscustom[linestyle=none]{\gSP{360}{540}} }%
       \psframe*[linecolor=white](-1,-1)(1,1)
     \endpsclip
%
     \psclip{ \pscustom[linestyle=none]{\gSP{180}{360}} }%
       \psframe*[linecolor=white](-1,-1)(1,1)
     \endpsclip
     \rput[l](-0.25,-0.13){Start}%
     \psline{->}(-0.225,-0.08)(-0.225,0)
     \multido{\iA=180+180,\iB=360+180}{8}{\gSP{\iA}{\iB}}
   \end{pspicture}%
}% end of savebox
}% end of ps4pdf
\pagestyle{empty}

\begin{document}
\begin{center}
\begin{figure}
%\includegraphics{diag.eps}
\PSforPDF{
   \usebox\PSTBox
}
\caption{My Caption}
\end{figure}
\end{center}

\savePics% saves all images as pictureXX.eps

\end{document}




More information about the PSTricks mailing list