[XeTeX] spurious errors when using pstricks with xdvipdfmx

Daniel Greenhoe dgreenhoe at yahoo.com
Sat Jul 30 09:17:51 CEST 2011

Here is a minimal example:

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

  first page

If it makes any difference, the input file I used was UTF-8-with-BOM
encoded. The pdf was generated using these commands:
  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.

The first page of graphics (page 2) always seems to be OK. Problems
only seem to occur on pages 3 and/or 4. And the problems seem to be
different each time.

Three sample output files are available at:

Many thanks in advance,

----- Original Message -----
From: Daniel Greenhoe <dgreenhoe at yahoo.com>
To: "xetex at tug.org" <xetex at tug.org>
Sent: Friday, July 29, 2011 6:39 PM
Subject: [XeTeX] spurious errors when using pstricks with xdvipdfmx


When using pstricks in documents more than 10 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.

My current technique is to use xelatex to generate an xdv file, and
then use
  xdvipdfmx  -p a4 -q -E
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.

I am running xelatex from Miktex 2.9 on a Windows 7 platform. Packages
I am using include

I tried invoking the xetex-pstricks package as well, but Miktex didn't
seem to know about such a package. However, the essence of the package
seems to be installed because I noted that my installation does have
these two files:

Might there be a buffer overflow somewhere? The errors seem to be
random (the worse kind of errors). Any suggestions?

Many thanks in advance,

Subscriptions, Archive, and List information, etc.:

More information about the XeTeX mailing list