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

My minimal example reads

\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]
\psSolid[object=vecteur,args=0.707 -0.5 0.5,label=n](0.707,-0.5,0.5)

and it results in the error

! Package xkeyval Error: `label' undefined in families `,pstricks,pst-node,pst-

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.
For more information about these matters, see the file
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
Compiled with xpdf version 3.02pl4

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.
Thanks in advance.

  • PS: Can someone please create the tag xkeyval? Thanks. Mar 3 '11 at 13:37
  • 2
    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. 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. Mar 3 '11 at 14:10
  • 4
    @Bastian: no problem, there are no silly question ...
    – user2478
    Mar 3 '11 at 14:50

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.