Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Note: Putting % at the end of \pstVerb (instead of \pstRightAngle) does not fix the displaced dot. –  Please don't touch Mar 12 '13 at 18:00

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
    
So will you append \ignorespaces to both of them for the next build? Or there is a reason to leave them as is? –  Please don't touch Mar 12 '13 at 18:53
    
not for \pstVerb which can also be used in the documents preamble. –  Herbert Mar 12 '13 at 18:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.