7

I'm trying to reproduce an example (figure 8) from the pst-optic documentation and it creates an unrecoverable error for Ghostscript (version 9.02). This is on a Mac using TeXShop. I have updated pst-optic to the latest version form TeXlive.

Here is the example:

\documentclass[11pt]{article}

\usepackage{pst-optic}
\usepackage{auto-pst-pdf}

\begin{document}

\begin{pspicture*}(-7.5,-2.75)(7.5,3) 
\rput(0,0){\lens[lensScale=0.6,XO=-4,nameF=F_1,nameA=A_1,nameB=B_1,
nameFi=F’_1,nameAi={ },nameBi={},nameO=O_1,focus=1,OA=-2,lensGlass=true, lensWidth =0.5]}
\pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(B’)(I’)(B) 
\Transform 
\rput(0,0){\lens[lensScale=1.2,XO=2,focus=2,nameA=A’_1,spotA=90,nameB=B’_1,spotB=270,
nameO=O_2,nameAi=A’_2,spotAi=270,nameBi=B’_2,spotBi=90,nameF=F_2,nameFi=F’_2,
lensTwo=true,lensGlass=true,lensWidth=0.5]} 
\pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(B’)(I’)(B) 
\end{pspicture*}

\end{document}  

Any help or pointers would be appreciated. (Note that I would have liked to add pst-optic as a tag to this question but do not have reputation to do so.)

  • Upon further investigation, it appears that the \pspolygon are what is causing the problem. – André Dec 26 '11 at 18:37
11

It is not an accent for the points, it is a single quote:

\pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(B')(I') 

And a polygon is always closed, you do not need the first point again at the end.

enter image description here

  • Thank you, that worked. I had simply copy-pasted the code from the doc and would never have found this. – André Dec 26 '11 at 21:01
  • I've tried to work with the package pst-optics. But it is not working. I've copied the example in this question and corrected it with the answer. Typesetting in gives the error in line 134 (!!!!) the example only has 19 lines?? auto-pst-pdf Error-pst-auto In the log file: /usr/local/texlive/2013/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty:134: Package auto-pst-pdf Error: "shell escape" (or "write18") is not enabled: auto-pst-pdf will not work! Thanks for the help. – Arne Timperman Sep 3 '13 at 14:54
  • run it with pdflatex -shell-escape <file> – user2478 Sep 3 '13 at 18:09

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.