1

I am having trouble installing and using pst-optex package. I went through the documentation installed all the prerequisites. But my tex comiler(TeXMaker) keeps giving errors. The code I have written is a simple example code from its documentation.

\documentclass[pstricks]{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}[showgrid](0,-0.3)(3,2.3)
\pnodes(0,1){A}(3,1){B}
\lens(A)(B)
\end{pspicture}
\end{document}

I get a undefined control sequence error at the line \begin{psp....

Could someone tell me what I could be missing of if there is a exhaustive material on this point me towards that. Thank you.

Rico
  • 6,097
arjun
  • 11
  • 2

1 Answers1

1

first check that you run xelatex and not pdflatex. Then:

for MikTeX: Go into the package manager (via the start button->MikTeX) and install pst-optexp

for TeXLive: do the same as for MikTeX or install it from the terminal: tlmgr install pst-optexp