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 forgot the rule to use \expandafter such that \rect can be used as the point arguments of both psframe and pspicture.







Could you review it once more?

share|improve this question
up vote 2 down vote accepted

PSTricks expects


to be followed by explicit coordinates. Thus \rect must be expanded before TeX starts looking to \begin.


Then you can say


The main problem here is that \expandafter only jumps over one token, so an indirect way has to be taken. This, of course, will break auto-pst-pdf or similar packages.

share|improve this answer
Is it possible no to use \expandcoordaux but merge it into a single \expandcoord? – kiss my armpit Jul 12 '12 at 9:33
@HiggsBoson No. There is no primitive method for jumping over a braced group, so in a way or the other auxiliary macros must be employed. It wouldn't be too difficult to extend PSTricks so that \begin{pspicture}[<options>] accepts to be followed by "implicit coordinates"; however, doing it for all PSTricks commands such as \psframe would require extensive work. – egreg Jul 12 '12 at 9:46

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.