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.

  • Note: Putting % at the end of \pstVerb (instead of \pstRightAngle) does not fix the displaced dot. – kiss my armpit Mar 12 '13 at 18:00
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

  • So will you append \ignorespaces to both of them for the next build? Or there is a reason to leave them as is? – kiss my armpit Mar 12 '13 at 18:53
  • not for \pstVerb which can also be used in the documents preamble. – user2478 Mar 12 '13 at 18:55

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.