spurious errors using pstricks in XeLaTeX under Miktex 2.9

Daniel Greenhoe <[email protected]>
Newsgroups gmane.comp.tex.miktex
Message-ID <CAF=Ssq4U=3CYhN39O0xmoJJjBmCdXv5Y4kMoPEsk2SGq1nEf5Q@mail.gmail.com>
Hello,

I am running Miktex 2.9 on Windows 7. When using pstricks in documents
with several pages, I often get
spurious errors. Elements from graphics (for examples nodes and lines)
sometimes float from where they are supposed to be to some place else
on the page or even onto another page. A minimal example is included below.

But the really exasperating part of this problem is that someone else
said that he tried the example on his computer also under Miktex 2.9,
and he reported no problems. So why would there be a difference? How
can I even go about to debug this?

One technique I use is to let xelatex to generate an xdv file, and
then use xdvipdfmx to produce the pdf. There seems to be no problem
with the xdv file:
For example, suppose page 16 in the pdf has an error. If I invoke
xdvipdfmx -s 1,16 -p a4 -q -E (just distill pages 1 and 16), then
there are no more errors on page 16 (I need page 1 because without it,
much or all of my ps graphics on later pages disappear). So the
problem seems to be with the xdv-->pdf stage using xdvipdfmx.

Here is a minimal example:

\documentclass{book}
\usepackage{pstricks}                 % graphics support
\usepackage{pstricks-add}             % fixe and addons for pstricks

\begin{document}
  first page
  \psset{unit=1mm}
  \newpage
  \begin{pspicture}(0,0)(150,150)
    \multirput(0,0)(0,15){10}{%
      \multirput(0,0)(5,0){30}{\psline(0,0)(0,10)}%
      }%
  \end{pspicture}
  \newpage
  \begin{pspicture}(0,0)(150,150)
    \multirput(0,0)(0,15){10}{%
      \multirput(0,0)(5,0){30}{\psline(0,0)(0,10)}%
      }%
  \end{pspicture}
  \newpage
  \begin{pspicture}(0,0)(150,150)
    \multirput(0,0)(0,15){10}{%
      \multirput(0,0)(5,0){30}{\psline(0,0)(0,10)}%
      }%
  \end{pspicture}
\end{document}

Here are commands for generating the pdf:
  xelatex -no-pdf test.tex
  xdvipdfmx -o test.pdf test.xdv

The above produces 4 pages of output; pages 2, 3, and 4 should each
contain 10 rows of 30 vertical lines.

Problems on my system mostly occur on pages 3 and/or 4. And the
problems tend to be
different each time.

Three sample output files are available at:
http://banyan.cm.nctu.edu.tw/~dgreenhoe/groups/test1.pdf
http://banyan.cm.nctu.edu.tw/~dgreenhoe/groups/test2.pdf
http://banyan.cm.nctu.edu.tw/~dgreenhoe/groups/test3.pdf

Any ideas? I have already tried reinstalling Miktex. My computer is
only about 3 months old and is a fairly major brand: Compaq Presario.

Many thanks in advance,
Dan

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.