# pstricks and beamer compilation with xelatex results in xkeyval error

I'm creating some slides and need to include a pstricks image. I'd like to compile the file via xelatex.

\documentclass[ngerman,xcolor=pst]{beamer}
\usepackage{fontspec,babel}
\usepackage{pst-solides3d,pst-3dplot,pst-eucl,pstricks}%
\title{Test}
\begin{document}
\begin{frame}
\begin{center}
\psset{unit=2}
\begin{pspicture}(-1.9,-0.7)(3,2.1)
\psset{viewpoint=3 -10  3,Decran=20,lightsrc=viewpoint}
\defFunction[algebraic]{sphere}(u,v){cos(u)*cos(v)} {sin(u)*cos(v)} {sin(v)}
\psSolid[object=surfaceparametree,base=pi neg pi 0 1,hue=0.3 0.3,function=sphere,linewidth=0.2pt,opacity=0.6,ngrid=0.1]
\axesIIID(1,3.5,.75)(1.25,5,1)
\psSolid[object=vecteur,args=0.707 -0.5 0.5,label=n](0.707,-0.5,0.5)
\psellipticarc{<-}(0,1.6)(1,0.2){300}{400}
\psellipticarc{->}(0,-0.1)(1.82,0.575){200}{340}
\end{pspicture}
\end{center}
\end{frame}
\end{document}


and it results in the error

! Package xkeyval Error: label' undefined in families ,pstricks,pst-node,pst-
solides3d,pst-3d,pst-plot,pst-3dplot,pst-eucl'.

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

l.19 \end{frame}


It was done with xelatex --version:

XeTeX 3.1415926-2.2-0.9997.4 (TeX Live 2010)
kpathsea version 6.0.0
Copyright 2010 SIL International and Jonathan Kew.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 4.4 [with modifications for XeTeX]
Compiled with zlib version 1.2.3; using 1.2.3
Compiled with FreeType2 version 2.3.11; using 2.3.11
Compiled with fontconfig version 2.7.3; using 2.8.0
Compiled with libpng version 1.2.40; using 1.2.40


I have no hint, how to fix this. Who can help?
Of course I looked in the xkeyval documentation: The explanation The keyname is not defined in the families. Probably you mistyped name. is not helpful.
• PS: Can someone please create the tag xkeyval? Thanks. – Bastian Ebeling Mar 3 '11 at 13:37
• Herbert's answer below indicates that the problem isn't related to your use of the beamer class or the xetex engine, or the xkeyval package. It seems to just be a pstricks syntax issue. So I removed all the tags but that one. – Matthew Leingang Mar 3 '11 at 13:54
• Just a tip for the future: In this cases it is good to really minify the example. Just deleted or comment out every package and line which seems unrelated and try to compile it again until the error changes or disappears. In the case of special classes like beamer try it with a standard class like article first to see if it makes a difference. Using this method the real cause of an issue can be narrowed down significantly without too much effort. – Martin Scharrer Mar 3 '11 at 14:38
\psSolid[object=vecteur,args=0.707 -0.5 0.5,label=n](0.707,-0.5,0.5)
there is no label keyword defined. Don't know where you read it.
• Thank you, that solved the problem. I can not recreate where the label came from - maybe I wanted a name for that. Sorry for this nearly silly question. – Bastian Ebeling Mar 3 '11 at 14:10