6

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}
3
+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

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.