[OS X TeX] EPS colour problem (blue-->purple)

Peter Dyballa Peter_Dyballa at Web.DE
Tue Jan 31 05:11:11 EST 2012

Am 31.1.2012 um 01:03 schrieb Richard:

> I think the problem is that the original file is in RGB, and Tex (Ghostscript?) applies a smaller CMYK palette when converting. Is there any way to control how EPS is converted to PDF?

In your first message you wrote:

>> When I Latex it using Texshop on Lion the -eps-converted-to.pdf file looks fine in the red areas, but blue areas change to a purple colour.

If it happens *automatically*, then it cannot be TeXShop which does the conversion. TeXShop performs this job rather *manually* by dragging PS or EPS files on TeXShop. TeXShop then presumingly uses the Perl script epstopdf. The script uses Ghostscript, gs, to perform the conversion:

* Ghostscript pipe: gs -q -dNOPAUSE -dSAFER -sDEVICE=pdfwrite -sOutputFile=EPS-Test.pdf -dPDFSETTINGS=/prepress -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dUseFlateCompression=false -dAutoRotatePages=/None - -c quit

Somewhere in the Ghostscript documentation its documented what /prepress does and what can be used instead. The epstopdf script hopefully will use the new settings via --gscmd='own values'. You could also use gs directly, without the epstopdf script, to convert the EPS file to PDF. I am a bit busy to read the documentation carefully and first make experiments...

Of course you can use Apple's /usr/bin/pstopdf for the conversion. Or, as Herb mentioned, PreView...

There is also the possibility that it's actually a pdfTeX side-effect which initiates the EPS to PDF conversion and inserts the PDF file, for example via Heiko Oberdiek's epstopdf package. Or you are using \includegraphics{foo.eps}. (In the latter case you could just omit the ".eps" file name extension and pdfTeX would pick the PDF variants of the file, if it already exists.) So give us the missing details and show us part of the TeX file's preamble!

> If I converted the EPS file to PDF elsewhere I still want it to appear within my document. Can I insert a figure straight into my document with filetype PDF?

As others already mentioned: yes. A simple \includegraphics{foo} should do the job. You have to use the package graphics or graphicx.

Another option is to read the file Eps-and-PdfLaTeX.pdf in /Applications/TeX. It will show an alternative to using gs for the EPS -> PDF conversion.



     _o    o         o   o
   _<<     \\_/\_,   \\_ \\_/\_,
  (*)/(*) (*)   (*) (*) `-    (*)

More information about the MacOSX-TeX mailing list