# [pstricks] Cartesian displacement for \uput? (sorry about previous no subject msg)

Herbert Voss LaTeX at zedat.fu-berlin.de
Sat Jan 28 11:08:07 CET 2006

Avery Andrews wrote:

>  > \qdisk(0,0){2pt}\uput[90](0,0){foo}\uput[(0,-1)](0,0){bar}
>  > ...
>
> This specifies the angle in cartesian terms, but as I understand the
> docs, the displacement would still have to be specified radially, i.e.
>
>  \uput{5em}[(10,10)](0,0){fub}
>
> whereas for this application (emulating Emma Pease's tree-dvips in
> PSTricks) I want to be able to do specify displacement distances in the
> x and y directions independently.  A vector addition notation in the
> special coordinates would do fine, for example if 'a' was a label, then
> (a+(1,2)) would be the point
> 1 xunit in the x direction from a, and 2 yunits in the y direction/

You can combine uput with rput

Herbert

\listfiles
\documentclass{article}
\usepackage{pstricks}
\SpecialCoor
\def\UPut[#1](#2)#3{\rput(#2){\uput{0}[0](#1){#3}}}
\begin{document}

\begin{pspicture}[showgrid=true](5,5)
\qdisk(2,1){2pt}
\uput[90](2,1){foo}
\UPut[2.828;45](2,1){bar}
\end{pspicture}

\end{document}