TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why do I need to insert % right after the opening curly brace { of multido rather than right after the closing } of \pstVerb? In my mental model, the unnecessary white spaces exist after the \pstVerb call so they must be removed by appending % right after } of \pstVerb.

    {% <-- this comment is necessary but I don't understand why.
        \pstVerb{/hx \ix\space .5 sub def}
        \uput[d](!hx 0){$\char\ic\mathstrut$}
        \uput[l](!0 hx){$\ix\mathstrut$}
            \psframe[origin={\ix,\iy},fillstyle=\ifodd\io solid\else vlines\fi,hatchsep=.5pt,hatchcolor=lightgray](-1,-1)
            \rput(!hx \iy\space .5 sub){$(\iy,\ix)$}
share|improve this question
up vote 5 down vote accepted

every macro which is declared as a PSTricks object like


will kill all preceding glue. \pstVerb is not a PSTricks object or in short: it is a normal TeX macro and \psframe is such an object.

A shorter version:

      \psTextFrame[fillstyle=\ifodd\io solid\else none\fi,fillcolor=lightgray]%
         (\ix,\iy)(!\ix\space 1 sub \iy\space 1 sub){$(\iy,\ix)$}}}
share|improve this answer
Why does the % come before \pstVerb{...} rather than after \pstVerb{...}? – kiss my armpit Apr 6 '14 at 13:15
\uput has a \pst@killglue – Herbert Apr 6 '14 at 13:19
Does it make sense to insert \pst@killglue in \pstVerb to kill the unnecessary whitespaces automatically? – kiss my armpit Apr 6 '14 at 13:28
no, makes no real sense. – Herbert Apr 6 '14 at 13:35

Your Answer


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.