[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:


\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}


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:
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

Many thanks in advance,
Dan



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

Hello,

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
\usepackage{pst-eps}
\usepackage{pstricks}
\usepackage{pstricks-add}
\usepackage{pst-grad}

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:
  \tex\xetex\xetex-pstricks\pstricks.con
  \tex\xelatex\xetex-pstricks\pstricks.con

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

Many thanks in advance,
Dan




--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex




More information about the XeTeX mailing list