3

In the pst-optexp documentation, they show this example:

A working example of the node labels

When I have the following code:

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}[showgrid](0, -.3)(3,3.3)
\pnode(0,2.5){A}\pnode(2,2.5){B}\pnode(2,1.5){C}%
\mirror[labelangle=-45](A)(B)(C){M}
\optbox[position=start, labeloffset=0,labelref=relative](C)(B){box}
\drawbeam(A){1}{2}
\end{pspicture}
\end{document}

I get this:

My implementation of the code, where the gray node labels are missing

How can I reproduce the gray node labels they have in their diagram?

3

Here you are. I completed the code. Note it works with pdflatex, thanks to the auto-pst-pdf package, if you add the --enable-write18 switch under MiKTeX, -shell-escape under TeX Live or MacTeX.

It also compile via latex->dvips->pstopdf, but remove auto-pst-pdf.

\documentclass[border=12pt, svgnames]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{pst-optexp}
\usepackage{auto-pst-pdf}

\begin{document}

\begin{pspicture}[showgrid](0,-0.3)(3,3.3)
\pnodes(0,2.5){A}(2,2.5){B}(2,1.5){C}
\mirror[labelangle=-45](A)(B)(C){M}
\optbox[position=start, labeloffset=0, labelref=relative](C)(B){box}
\drawbeam(A){1}{2}
\psdots[linecolor=Gainsboro](A)(B)(C)
\everypsbox{\color{Silver}}
\nput{90}{A}{A}
\nput{-135}{B}{B}
\nput{50}{C}{C}
\end{pspicture}

\end{document} 

enter image description here

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.