我刚刚尝试编译下面的图片xelatex
\documentclass[pstricks,crop]{standalone}
\usepackage{pst-optic}
\usepackage{pstricks-add}
\begin{document}
\newpsstyle{opticalAxis}{linewidth=0.5pt,linecolor=blue,linestyle=dashed}
\begin{pspicture}(-20,-6)(20,6)
\psgrid[style=gridstyle,subgriddiv=1,subgridcolor=gray!50]
\rput(0,0){\lens[AB=5,focus=5,OA=-17,xLeft=-20,xRight=20,yTop=6,yBottom=-6,lensHeight=11]}
\end{pspicture}
\end{document}
然而输出如下所示:
知道这里出了什么问题以及如何修复它吗?
答案1
它与最新的 TeXLive 2015 兼容:
\documentclass[pstricks]{standalone}
\usepackage{pst-optic}
\begin{document}
\newpsstyle{opticalAxis}{linewidth=0.5pt,linecolor=blue,linestyle=dashed}
\begin{pspicture}(-20,-6)(20,6)
\psgrid[style=gridstyle,subgriddiv=1,subgridcolor=gray!50]
\rput(0,0){\lens[AB=5,focus=5,OA=-17,xLeft=-20,xRight=20,yTop=6,yBottom=-6,lensHeight=11]}
\end{pspicture}
\end{document}