Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Quoted from pst-news13.pdf on page 3:

The labelsep is the first – optional – argument of \uput. It is now possible to use the PostScript notation for this length, eg {! 45 sin 3 mul}. Then the unit which is active when \uput is active is used. With a unit the PS notation is not allowed and leads to an error!

If labelsep (which is a length key) can accept an RPN expression, why can't nodesep and offset (which are also length keys) accept RPN expressions?

For the current implementation, angle can be expressed in RPN such as angle={!30 60 add}.

The following is the MWE for you.

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks-add}

\begin{document}
    \begin{pspicture}[showgrid](3,3)
        \pnode{A}
        \pnode
        [!
            60 cos 3 mul
            60 sin 3 mul
        ](A){B}
        \psline{->}(A)(B)
    \end{pspicture}

%   \begin{pspicture}[showgrid](3,3)
%       \pnode{A}
%       \psline(A){->}([nodesep=,offset=]A)
%   \end{pspicture}
\end{document}
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted
+100

nodesep and offset are a length and must have a unit, at least the current one.

\documentclass{article}
\usepackage{pst-node}

\begin{document}
    \begin{pspicture}[showgrid](3,3)
        \pnode{A}
        \pnode
        [!
            60 cos 3 mul
            60 sin 3 mul
        ](A){B}
        \psline{->}(A)(B)
    \end{pspicture}

\bigskip
   \begin{pspicture}[showgrid](3,3)
       \pnode{A}
       \psline{->}(A)(!\psGetNodeCenter{A} 
         A.x 60 cos 3 mul add 
         A.y 60 sin 3 mul add)
   \end{pspicture}

\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

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.