3

I have been trying to solve this error by myself but did not find a way. So if someone out there can help me, any help is greatly appreciated!

I use Texmaker to run MikTex 2.9. I want to use the package PSTricks to draw something.

To do so, I run LaTex on an UTF8-formatted tex-file. This is my minimal example:

\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}

and it gives me an error message saying:

! Package xkeyval Error: 'conn' undefined in families `,pstricks,pst-node,pst-t ools,pst-plot,pst-eucl,pst-3d,pstricks-add,optexp'.

See the xkeyval package documentation for explanation. Type H for immediate help. ...

l.46 \optdiodeconn=-i(4,1){Diode}

To check for outdated package versions I have here the \listfiles result:

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

Anyone having an idea?

10
  • On my system it compiles fine. Is this a minimal file that does not compile for you?
    – Bernard
    Commented Jul 25, 2014 at 20:18
  • yes, this does NOT compile for me. It does compile if I change conn=-i to beam e.g. (which is another option).
    – Tobias
    Commented Jul 25, 2014 at 20:30
  • But for whatever reason keys like conn cause an error ...
    – Tobias
    Commented Jul 25, 2014 at 20:31
  • Finally I can reproduce your problem, compiling with LaTeX. I have no idea why such an error. However, if you add the pdf option to the document class and compile with pdflatex it does compile without an error. This is the first case I meet that compiles with pdflatex and not with latex, I must say.
    – Bernard
    Commented Jul 25, 2014 at 20:41
  • I'm sorry to ask again but how did your working documentclass look exactly?
    – Tobias
    Commented Jul 25, 2014 at 20:52

1 Answer 1

2

There is no more an option conn in the current version (see documentation!) Use instead:

\begin{pspicture}[showgrid=true](4,2)
  \optdiode(0,1)(4,1){Diode}
  \drawbeam[beaminsidefirst]{}(B)
\end{pspicture}
2
  • Thanks for your answer! I did read the documentation on pstricks and opt-exp but I took an old pdf (from 2009?) instead of up to date documentation... -.-
    – Tobias
    Commented Jul 25, 2014 at 21:17
  • Use always the command texdoc pst-optexp then you'll get the up-to-date version.
    – user2478
    Commented Jul 25, 2014 at 21:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .