8

Please consider the position of the red dots.

enter image description here

First Case

When I don't activate \pstVerb{/xxx 1 def}, the red dot is properly positioned.

\documentclass[border=12pt]{standalone}
\usepackage{pst-eucl}
\addtopsstyle{gridstyle}{gridlabels=0,griddots=0}

\begin{document}
\begin{pspicture}[showgrid](2,2)
    \pstGeonode{A}(1.5,0){B}(1.5,1.5){C}
    \pstRightAngle[fillstyle=solid,fillcolor=green!50]{A}{B}{C}
    %\pstVerb{/xxx 1 def}
    \psdots[linecolor=red](1,1)
\end{pspicture}    
\end{document}

Second Case

When I activate \pstVerb{/xxx 1 def}, the red dot is displaced from its correct position.

\documentclass[border=12pt]{standalone}
\usepackage{pst-eucl}
\addtopsstyle{gridstyle}{gridlabels=0,griddots=0}

\begin{document}
\begin{pspicture}[showgrid](2,2)
    \pstGeonode{A}(1.5,0){B}(1.5,1.5){C}
    \pstRightAngle[fillstyle=solid,fillcolor=green!50]{A}{B}{C}
    \pstVerb{/xxx 1 def}
    \psdots[linecolor=red](1,1)
\end{pspicture}
\end{document}

Third Case

When I append % at the end of \pstRightAngle[fillstyle=solid,fillcolor=green!50]{A}{B}{C}, the red dot returns to its proper position.

\documentclass[border=12pt]{standalone}
\usepackage{pst-eucl}
\addtopsstyle{gridstyle}{gridlabels=0,griddots=0}

\begin{document}    
\begin{pspicture}[showgrid](2,2)
    \pstGeonode{A}(1.5,0){B}(1.5,1.5){C}
    \pstRightAngle[fillstyle=solid,fillcolor=green!50]{A}{B}{C}%<== why do I need this comment?
    \pstVerb{/xxx 1 def}
    \psdots[linecolor=red](1,1)
\end{pspicture}
\end{document}

The question:

Why do I need to put % at the end of \pstRightAngle[fillstyle=solid,fillcolor=green!50]{A}{B}{C} rather than at the end of \pstVerb{/xxx 1 def}? It is really confusing.

1 Answers1

5

There is a missing \ignorespaces at the end of \pstRightAngle in the code:

[...]
    \fi\fi\fi}%
  \egroup\ignorespaces%
}%

\pstVerb will also give a space but the following \psdots has a \pst@killglue at the beginning. So both, \pstRightAngle and \pstVerb, have a trailing space but only one is ignored by the following \psdots