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 define a constant globally within my pspicture environment as follows:

\pnode(!\length 1){C}
% other codes truncated here for simplicity.

The above example does not work.

What is the correct way to do that?

share|improve this question

migrated from stackoverflow.com Jul 27 '11 at 9:07

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

We can use a (La)TeX macro or PS verb. When using a (La)TeX macro, \space is needed to prevent the macro from eating things after it. But when using PS verb, \space is not needed.

See the following for the details.

    \pstVerb{/length 2 def}
    \pnode(!\LENGTH\space 1){C}
    \pnode(! length 1){D}
share|improve this answer

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.