# How to prevent my node label from getting displaced to the left?

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

\begin{document}
\begin{pspicture}(3,4)
\pstGeonode(1,1){A_i}
\pstGeonode[PointName=A_j](1,2){Aj}
\pstGeonode[PointName=R_{i,j,k,l}](1,3){Rijkl}
\end{pspicture}
\end{document}

How to prevent my node label R_{i,j,k,l} from getting displaced to the left without using PointNameSep?

-
It seems to be a bug. –  kiss my armpit Mar 15 '14 at 10:23

Of course this is not a bug, but an unidentified feature ;)

You can define a new key, e.g. PointNameAlign and redefine \Pst@PutPointLabel to use this key as alignment parameter for \rput:

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl}
\makeatletter
\define@key[psset]{pst-eucl}{PointNameAlign}{\edef\psk@PointNameAlign{#1}}%
\psset[pst-eucl]{PointNameAlign=c}
\def\Pst@PutPointLabel#1{%DR 041104
\ifx\psk@PointName\@none\else
\rput[\psk@PointNameAlign]{*0}([nodesep=\ifx\psk@PointNameSep\@default{1em}\else\psk@PointNameSep\fi,
angle=\ifx\psk@PosAngle\@undef{0}\else\psk@PosAngle\fi]#1)%
{\ifPst@PtNameMath$\Pst@WhichLabel{#1}$\else\Pst@WhichLabel{#1}\fi}
\fi}%
\makeatother
\begin{document}
\begin{pspicture}(3,4)
\psset[pst-eucl]{PointNameAlign=l}
\pstGeonode(1,1){A_i}
\pstGeonode[PointName=A_j](1,2){Aj}
\pstGeonode[PointName=R_{i,j,k,l}](1,3){Rijkl}
\end{pspicture}
\end{document}

The only difference to the original definition is the [\psk@PointNameAlign].

-
Because without specifying an alignment, \rput places the content centered at the given coordinates, which is what you see in your example. –  Christoph Mar 16 '14 at 21:00
They are centered at a distance of 1em (default value of PointNameSep) and an angle of 0 degree (PosAngle) from the actual node. –  Christoph Mar 17 '14 at 8:19
When the label is a bit longer, it extends more to both left and right and finally overlaps with the dot... –  Christoph Mar 17 '14 at 8:31

The reason is that, as I understand it, the placement of labels relies on \rput. The default value of PointNameSep is 1em, and then the label itself is placed on the left of the position so defined. It should be on the right for labels at the right of the point, and on the left for labels at the left. One solution is to increase the value of PointNameSep by trial-and-errors; another is to set PointName=none and use \uput. Both solutions are illustrated with this code:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{pstricks}
\usepackage{pst-eucl}
\usepackage{auto-pst-pdf}

\begin{document}

\begin{pspicture}(0,0)(3,5)%
\pstGeonode(1,1){A_i}
\pstGeonode[PointName=A_j](1,2){Aj}
\pstGeonode[PointName=R_{i,j,k,l},PointNameSep =1.85em](1,3){Rijkl}
\pstGeonode[PointName=none](1,4){Sijkl}\uput{1pt}[r](Sijkl){$S_{i,j,k,l}$}
\end{pspicture}

\end{document}

-
Sadly it is not what I am looking for. :-) –  kiss my armpit Mar 15 '14 at 12:23
@WeirdstressFunction: Could you be more precise about what you're looking for? The last solution I gave doesn't use PointNameSep. –  Bernard Mar 15 '14 at 19:46
The last solution is too verbose so I don't like it as well. :-) –  kiss my armpit Mar 16 '14 at 3:15
If you don't intend to change parameters (colour of the dot, for instance), it's easy to turn it into a personal macro. Or you write to the author: it looks very much like a bug. –  Bernard Mar 16 '14 at 10:00