TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I want to create a new PSTricks object, e.g., \myBatLogo[<key-val options>]{}{}...{} that is not a redefinition of a built-in PSTricks object.

It means that any redefinition as follows does not make sense in my scenario.

\newpsobject{myBatLogo}{<built-in PSTrick object>}


How to define a new PSTrick object that is not a redefinition of a built-in PSTricks object? It must accept key-value optional arguments and mandatory arguments.

share|improve this question
a curve, an area, or something special? – Herbert Jan 11 '11 at 14:26
@Herbert: for simplicity, let the new object just draw BATMAN logo with fillcolor as an optional argument and the center bounding box position {x,y} as the mandatory argument. – xport Jan 11 '11 at 14:36
I have no idea about PSTricks, but can't you simply define a macro (maybe using keyval for the optional arguments) that expands to the code to draw the object using built-in PSTrick objects? – Juan A. Navarro Jan 11 '11 at 15:19
@Juan: It is possible but I want to use the mechanism the PSTricks authors use. – xport Jan 11 '11 at 16:39
up vote 2 down vote accepted

\psBatman[fillcolor=red!50,shadow=true,framesep=20pt,framearc=0.3](3,4){\Huge Me}
\psBatman*[linecolor=blue!20,framesep=20pt](6,6){\huge you}

alt text

share|improve this answer
Is there a counterpart of \begin@ClosedObj ? Is it \begin@OpenObj ? – xport Jan 11 '11 at 16:03
@xport: yes, that one can have line ends like arrows. And we have \begin@SpecialObj for special purposes. – Herbert Jan 11 '11 at 16:08
Is there a free documentation on the web explaining how to use these macros? – xport Jan 11 '11 at 16:37
@xport: sure mirror.ctan.org/graphics/pstricks/base/doc/pstricks-doc.pdf. pp 163 for high level objects (without using PostScript code) and pp 171 for low level objects (coordinate transformation and using PostScript code). – Herbert Jan 11 '11 at 16:43
thanks for the link. – xport Jan 11 '11 at 17:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.