我一直在尝试自己解决此错误,但没有找到方法。所以如果有人能帮助我,我将不胜感激!
我使用 Texmaker 运行 MikTex 2.9。我想使用包 PSTricks 来绘制一些东西。
为此,我在 UTF8 格式的 tex 文件上运行 LaTex。这是我的最小示例:
\documentclass[11pt, a4paper]{scrbook}
%\usepackage{pst-all}
%\usepackage{pstricks}
\usepackage{pst-optexp}
%\usepackage{pst-all}
%\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}[showgrid=true](4,2)
\optdiode[conn=-i](0,1)(4,1){Diode}
\end{pspicture}
\end{document}
它给了我一条错误消息:
! 软件包 xkeyval 错误:‘conn’ 在家族‘,pstricks,pst-node,pst-t ools,pst-plot,pst-eucl,pst-3d,pstricks-add,optexp’中未定义。
请参阅 xkeyval 包文档以了解解释。输入 H 可立即获得帮助。...
l.46 \optdiodeconn=-i(4,1){二极管}
为了检查过时的软件包版本,我在这里使用 \listfiles 结果:
scrbook.cls 2013/12/19 v3.12 KOMA-Script document class (book)
scrkbase.sty 2013/12/19 v3.12 KOMA-Script package (KOMA-Script-dependent basics and keyval usage)
scrbase.sty 2013/12/19 v3.12 KOMA-Script package (KOMA-Script-independent basics and keyval usage)
keyval.sty 2014/05/08 v1.15 key=value parser (DPC)
scrlfile.sty 2013/12/19 v3.12 KOMA-Script package (loading files)
tocbasic.sty 2013/12/19 v3.12 KOMA-Script package (handling toc-files)
scrsize11pt.clo 2013/12/19 v3.12 KOMA-Script font size class option (11pt)
typearea.sty 2013/12/19 v3.12 KOMA-Script package (type area)
pst-optexp.sty 2014/06/04 v4.10 Optical experimental setups with PSTricks
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
pstricks.sty 2013/12/12 v0.60 LaTeX wrapper for `PSTricks' (RN,HV)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
pstricks.tex 2014/05/19 v2.54a `PSTricks' (tvz,hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
xkeyval.sty 2014/05/25 v2.7 package option processing (HA)
xkeyval.tex 2014/05/25 v2.7 key=value parser (HA)
pst-fp.tex 2014/05/19 v2.54a `PST-fp' (hv)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
dvips.def 2014/04/23 v3.0j Driver-dependant file (DPC,SPQR)
pst-xkey.sty 2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)
pst-node.sty 2010/04/22 package wrapper for pst-node.tex
pst-node.tex 2014/03/25 1.33 `pst-node' (tvz,hv)
pst-plot.sty 2011/04/13 package wrapper for pst-plot.tex (hv)
multido.sty 2004/05/17 package wrapper for PSTricks `multido.tex', (HV/RN)
multido.tex 2010/05/14 v1.42 `multido' (tvz,hv)
pst-plot.tex 2014/07/07 1.64 `pst-plot' (tvz,hv)
pst-eucl.sty 2014/05/17 package wrapper for PSTricks pst-eucl.tex
pst-tools.sty 2012/01/01 package wrapper for pst-tools.tex (hv)
pst-tools.tex 2014/07/07 v1.64 `PST-tools' (hv)
pst-eucl.tex 2014/05/17 v1.51 `PST-eucl' (dr,hv)
pstricks-add.sty 2010/02/11 v. 0.14 package wrapper for pstricks-add.tex (hv)
pst-3d.sty 2009/07/28 package wrapper for pst-3d.tex (hv)
pst-3d.tex 2010/02/14 v1.11 `PST-3d' (hv)
pst-math.sty 2009/01/20 package wrapper for PSTricks pst-math.tex
pstricks-add.tex 2014/07/22 v3.75 `PSTricks-add' (hv)
pstricks-add.pro 2009/12/17 v. 0.23, PostScript prologue file (hv)
pstricks-add.cfg 2005/01/10 v0.1 addtional user stuff (hv)
environ.sty 2014/05/04 v0.3 A new way to define environments
trimspaces.sty 2009/09/17 v1.1 Trim spaces around a token list
pst-optexp.pro
有人有想法吗?
答案1
conn
当前版本中没有更多选项(请参阅文档!)请改用:
\begin{pspicture}[showgrid=true](4,2)
\optdiode(0,1)(4,1){Diode}
\drawbeam[beaminsidefirst]{}(B)
\end{pspicture}