I tried to replace the temporary labels TMP1, TMP2 and TMP3 in an .eps file made with ChemDraw v18 on Mac OSX Mojave using the chemnum package, so to get an automatic numbering of the compounds, but this did not work for me.

I tried different fonts for the label in the .eps file, or other options for auto-pst-pdf with no result.

The problem originally occurred on TexLive 2014 for Mac remains with Mac OSX 10.14 and TexLive 2019, compilation with pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex(I use TexStudio).

For the following MWE with the following eps file.



    \caption[test]{A test to make the numbering work}


The picture is inserted properly and the file test_cmpd_numbering-pics.pdf generated (that's a progress from previously), but the TMP1, TMP2 etc. labels are not replaced. Here is the log file. It has got the error 'non-PDF special ignored!' which is often related to PdfLaTex difficulties on MacOSX.

Does anyone know why this code could make problems on Mac?

  • Your example works for me if I comment out \usepackage{epstopdf} (with the package it doesn't work) and compile with pdflatex (shell-escape enabled). The only tag that isn't replaced is in then TMP1 in THF, -30\260 but this can't work: psfrag needs “a single word, composed of unaccented letters and numbers”. (then TMP1 in THF, -30\260 is not a single word)
    – cgnieder
    Oct 7 '14 at 22:41
  • If I comment out \usepackage{epstopdf}, the aziridineopening-converted-to.pdf file is not created, hence an empty white space is included instead of the picture. Curiously I get no warning or error message. I tested in a terminal if epstopdf works for himself - it seems fine and if I start it manually in the terminal, the ...-converted-to.pdf file is created correctly.
    – Simon N.
    Oct 8 '14 at 11:12
  • @SimonN. But auto-pst-pdf should also create a ...-pics.pdf. (provided you're compiling with shell-escape enabled)
    – cgnieder
    Oct 9 '14 at 7:01
  • If I comment out \usepackage{eps-to-pdf} from the top MWE and compile with --shell-escape, the ...-pics.pdf file is created, but it has no content. If I open this ...-pics.pdf-file with a visualization program such as Preview or AdobeReader, I see only a small white quadrangle. And the aziridineopening-converted-to.pdf file is not created. Here the log file
    – Simon N.
    Oct 9 '14 at 10:03
  • The error message for the previous comment is: Error: /undefined in obj Operand stack: 2 0 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push (...) -- Current allocation mode is local Last OS error: Invalid argument Current file position is 132440 GPL Ghostscript 9.10: Unrecoverable error, exit code 1
    – Simon N.
    Oct 9 '14 at 10:05

Turns out there were 2 problems associated with this.

  1. The PATH in TexStudio needed to be changed. This is a similar issue as .eps files and pdflatex and reconfiguring texstudio as described here solved it, here is a picture to clarify: TexStudio change PATH

  2. ChemDraw 18 on Mac does not generate the .eps file properly, ie defining the text correctly. This issue is known and explained in more detail in Chemdraw 16 for Mac OSX not working with psfrag and label replacing/autonumbering My solution was to generate the .eps file on a Windows computer running ChemDraw 16...

The combination of both solved the problem for the above MWE. I have edited the above question to reflect more the nature of the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.