[XeTeX] Preview package with XeLaTeX

Jonathan Kew jonathan_kew at sil.org
Thu Feb 28 00:49:54 CET 2008


On 27 Feb 2008, at 10:40 pm, Easter Sunshine wrote:

> Hi, I'd like to be able to use the preview package to
> generate a PDF showing only one environment such as a
> TiKZ figure. I have included a minimal .tex file which
> compiles as expected with pdflatex but produces
> incorrect results without error with xelatex (it is on
> a letter-sized page). I have attached pdflatex's
> output PDF to show what I'd like.

The first paragraph of the documentation for preview.sty states:

<quote>
This works with DVI files postprocessed by either Dvips and  
Ghostscript or dvipng, but it also works
when you are using PDFTEX for generating PDF files (usually also  
postprocessed by Ghostscript).
</quote>

Note that it does *not* have any support for dvipdfm(x)-based output.

>
> I have tried passing a couple of driver options to the
> preview package (such as dvips and xdvipdfmx), and
> also tried -no-pdf followed by an xdvipdfmx and
> received a lot of warnings but I'm not sure if they
> are relevant.

As far as I can see at a glance, the only driver options preview  
recognizes are dvips and pdftex. With the dvips option, it writes  
literal PostScript code that xdvipdfmx won't handle; and with pdftex,  
it uses pdftex-specific commands (in particular \pdfhorigin and  
\pdfvorigin) which will give errors in xetex.

I suggest asking the author of preview.sty to consider supporting  
xetex (or dvipdfmx) as an alternative driver.

JK



More information about the XeTeX mailing list