# Why can the labelsep of \uput not work when represented in RPN?

In order to be more noticeable, I present my comment as a new question here.

## Background:

\uput with the following syntax

accept 5 arguments. I have tested the last four arguments that they can be represented in RPN. The first argument is the only one cannot be represented in RPN.

## Question:

Why can the first argument of \uput not be represented in RPN? Is it a bug? You can try \uput{! 2 sqrt}[!0]{!0}(!0 0){Hello World} to put Hello World \sqrt{2} unit length away to the right of the origin (0,0), but it fails.

-
This isn't an issue about RPN. You're trying to pass postscript code through the arguments. I haven't played too much with \uput. As I get a chance today, I'll look at this. –  A.Ellett May 6 '13 at 19:17
@A.Ellett: So the first argument cannot accept RPN expression? –  In PSTricks we trust May 6 '13 at 19:26
Postscript is written in RPN. After an initial look at pstricks.tex, it looks like \uput isn't designed to accept Postscript arguments. –  A.Ellett May 6 '13 at 19:49
@A.Ellett: Can you guess the reason why it was designed without supporting RPN for the first argument? You can make your comment as your answer. –  In PSTricks we trust May 6 '13 at 19:56
@A.Ellett: you do not understand the meaning and definition of the different arguments. \uput understands PS arguments. –  Herbert May 12 '13 at 5:53

For the newest pstricks package, the labelsep of \uput can accept RPN expression (without unit) and it takes the active unit.

\documentclass[pstricks,border=12pt]{standalone}
\SpecialCoor
\begin{document}
\begin{pspicture}[showgrid](-1,-1)(3,3)
\pscircle(1,1){!2 sqrt}
\uput{!2 sqrt}[45](1,1){\qdisk(0,0){2pt}}
\end{pspicture}
\end{document}


-

This isn't an issue about RPN or not. This is about the ability to pass Postscript commands through \uput. This doesn't seem to work. I'm drawing a complete blank why. Someone better acquainted with the internals of pstricks can explain that.

But, I'm assuming that you want to be able to make some kind of contextually dependent decisions on how text is placed (if not, then just write the actual values in). You can use a bit of expl3 magic to get this done as in the following code:

\documentclass{article}
%..%
\usepackage{xparse}
\ExplSyntaxOn
\DeclareDocumentCommand{\fpsqrt}{ m }
{
\fp_eval:n {  #1 ^ ( 1 / 2 ) }
}
\ExplSyntaxOff
%..%
\usepackage{pstricks}
\psset{unit=0.5cm}
\pagestyle{empty}
\begin{document}

$\sqrt{2}=\fpsqrt{2}$

\begin{pspicture}[showgrid=true](-10,-10)(10,10)
\uput{ \fpsqrt{2} }[0]{30}( 0, 0){Hello World}
\end{pspicture}

\end{document}


This results in

-
I usually use fp package. So I can summarize that it is a bug in PSTricks. :-) –  In PSTricks we trust May 6 '13 at 20:50
I didn't recommend fp only because the documentation is so poor. –  A.Ellett May 6 '13 at 20:52
But its syntax is more beautiful. :D –  In PSTricks we trust May 6 '13 at 20:53