# XeTeX and graphicx: characters missing in .eps

I'm trying to include an .eps in a XeTeX file I am working on. The eps file contains an image and some painstakingly-spaced text labels. For some reason, however, some of the characters in the text do not show up. I've scoured the internet, and tried recreating an example using pdfTeX instead, and it's clearly a XeTeX issue. Not using XeTeX is not an option.

Basically, the image shows up fine, but the text is missing -- with the exception of the square brackets around the text, and certain special characters in the IPA. So if I have the text [dum] it shows up as [ ]; if I have [dɨm] it shows up as [ ɨ ], [dʉm] shows up as [ ʉ ], and so forth. The font of this text is not the main font I'm using in the document - it looks to me like it might be Computer Modern, but it's hard to tell from just one character.

Here is a MWE, compiled with xelatex:

\documentclass{article}
\usepackage[xetex]{graphicx}
\begin{document}
\includegraphics{image.eps}
\end{document}


If I run the exact same code, minus the [xetex] option in graphicx, using pdfLatex, the eps shows up just fine!

What might be causing this? Any suggestions are welcome.

-
Does eps2eps or epspdf help? Also, do you, by any chance, get warnings about missing dvipdfmx.cfg? – Andrey Vihrov May 4 '11 at 8:15
I'm not sure if I've been Doing It Right (tm), but I tried using the epstopdf package, as well as converting the eps to pdf using ghostscript and making sure the fonts were embedded. The eps looks fine in gsview, and if I open the resulting pdf with a pdf viewer it looks fine too. But using graphicx to bring it into XeTeX yields the same results... – rcraioveanu May 4 '11 at 8:18
The weird part is that it doesn't give me any errors or warnings at all. I can't find any mention in the log file of anything going wrong. – rcraioveanu May 4 '11 at 8:26
Haha, all right, @AndreyVihrov... using epspdf to convert the eps to a pdf first works a charm. I have no clue why my previous efforts with ghostscript failed, but I'm very glad this works! Thanks for your super quick reply, and for recommending epspdf :) Though if anyone else has any idea what might be causing XeTeX to do this, I'd love some resolution. – rcraioveanu May 4 '11 at 8:30
I'll make that an answer then. – Andrey Vihrov May 4 '11 at 8:32

XeTeX can't include EPS files directly, so the driver program converts them to PDF beforehand. The conversion command by default is

ps2pdf -dCompatibilityLevel=%v -sPAPERSIZE=a0 -dAutoFilterGrayImages=false
-dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false
-dColorImageFilter=/FlateEncode %i %o


(From dvipdfmx.cfg.)

In case it does not work, a manual conversion can be tried, either by using epspdf or another program.

Don't ask me what's wrong with the default command, though :-) My guess is that it's meant to handle PS and not EPS (Encapsulated PostScript) formats.

-