2

I am trying to draw a diagram with pst-optexp in MikTex on Windows. Every time I try to compile using XeLatex, it would throw an error saying MiKTeX GPL Ghostscript 9.19: Unrecoverable error, exit code 1, so I tried the answer here which did not resolve the issue. I tried using the advice here but I could not find the file it referenced. Below is an example that demonstrates the issue. What can I do?

\documentclass{article}
\usepackage{filecontents}
\usepackage{pstricks}
\usepackage[crop=off]{auto-pst-pdf}
\usepackage{pst-optexp}
\usepackage{physics}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{tikz}

\begin{document}

\begin{pspicture}
    \begin{optexp}
        \optbox[innerlabel, position=start](L)(End){$\ket{\psi_1}$}
        \beamsplitter[bssize=0.4, labelangle=-90](L)(L|C)(C){50/50 BS}
    \end{optexp}
\end{pspicture}

\end{document}
  • give a complete and short example, which shows your problem. – user2478 Nov 27 '17 at 21:07
  • @Herbert updated with complete example – Billy Kalfus Nov 27 '17 at 21:14
2

You are using node names, eg (L) but didn't define any with \pnode Look into the documenation for an example or use coordinates:

\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-optexp}

\begin{document}

\begin{pspicture}(-0.3,0)(2,3.7)
\psset{labeloffset=1, optboxwidth=1, arrowscale=1.5, arrowinset=0}
\optbox[position=end, labelangle=90](1,1)(1,2){Box}
\beamsplitter[labelangle=-90](1,2)(1,1)(2,1){BS}
\drawbeam[arrows=->]{1}{2}(2,1)
\end{pspicture}

\end{document}
  • Can you show what this should look like? In the code you provided, there is no box around where the optbox should be and no beam appears. – Billy Kalfus Nov 27 '17 at 22:13
  • see my answer to the other question. – user2478 Nov 28 '17 at 7:43

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.