# [XeTeX] Using pst-pdf and xelatex

José Carlos Santos jcsantos at fc.up.pt
Tue Apr 13 15:30:37 CEST 2010

On 13-04-2010 9:33, Ulrike Fischer wrote:

>> This is the first time that I post here and I am just starting to work
>> with xe(la)tex.
>>
>> What I would like to know is this: is it possible to use the pst-pdf
>> package on a document which is compiled with xelatex?
>>
>> If I had this document:
>>
>> ---------------------- test.tex ----------------------
>> \documentclass{article}
>> \usepackage[nopstricks]{pst-pdf}
>> \begin{document}
>> Something.
>> \end{document}
>> ------------------------------------------------------
>>
>> I could compile it using pdflatex, in order to get a PDF document. But
>> if I compile it using xelatex, then the result of the presence of the
>> pst-pdf package is that xelatex tries to extract the PostScrit images
>> from this document. Since there are none, it creates no output. What
>> should I do?
>
> xelatex can handle eps and a lot of pstricks quite fine. So at a
> first glance it looks as if you don't need something like pst-pdf.

I had no idea. Thanks a lot! You saved me a lot of time. I was about to
start to convert several dozens eps files into pdf files, as Wilfred van
Rooijen had suggested (and he also has my thanks, of course).

> But xelatex (more precisly: xdvipdmfx) handle the postscript by
> calling ghostscript in the background to convert the graphics on the
> fly during the compilation. If you have a lot of graphics/pstricks
> this can slow down compilation.
>
> So it would be fine to have something like pst-pdf that generates
> all graphics in one go in a separate document which can then be
> this package works fine with xetex:
>
> \documentclass{article}
> \usepackage[active,xetex,tightpage]{preview}
> \begin{document}
>
> some text not in a graphic
>
> \begin{preview}
> \fbox{some more text}
> \end{preview}
>
> \begin{preview}
> a graphic
> \end{preview}
> \end{document}
>
> So I don't see a principal reason why pst-pdf shouldn't work with
> xetex. But it would have to be adapted first to the changed work
> flow (not latex, dvips, pdflatex but xelatex + xelatex).

Indeed. I shall transmit this suggestion to Rolf Niepraschk.

Best regards,

Jose Carlos Santos