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?

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

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


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}

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.