0

I ran into the problem that in my .eps files generated via ChemDraw 16.0 do not get their tags replaced. I tried using a .eps file from 2 years ago (because back then everything worked fine) and for this file it worked.

So I generated the same file twice, once using ChemDraw 16.0 and once using Chemdraw 15.0 and only the latter worked.

This is the code I used:

\documentclass[
a4paper,                       %% DIN A4-Papier
DIV=calc,                       %% Satzspiegel berechnen
11pt,                          %% Schriftgröße
captions=tableheading,         %% Tabellenüber- statt unterschriften
english%,german,ngerman         %% deutsch als Dokumentsprache, Englisch als zusätzliche
]{scrreprt}                    %% KOMA-Skript Report als Klasse

\usepackage{graphicx}       
\usepackage{hyperref}   
\usepackage{chemnum}
\usepackage{auto-pst-pdf}
\begin{document}

\begin{figure}
    \centering
    \replacecmpd{cmpd:1}
    \replacecmpd{cmpd:2}
    \replacecmpd{cmpd:3}
    \includegraphics[width=1\textwidth]{ChemDraw/CHI-014-CD15.eps}
\end{figure}

\begin{figure}
    \centering
    \replacecmpd{cmpd:1}
    \replacecmpd{cmpd:2}
    \replacecmpd{cmpd:3}
    \includegraphics[width=1\textwidth]{ChemDraw/CHI-014.eps}
\end{figure}
\end{document}

EPS File generated with Chemdraw 16.0

This is what my file looks like

Can anyone imagine why this occurs or help me out so I can also use ChemDraw 16.0?

  • 1
    I needed at least 10 reputation for 3 links so here is the link to the .eps file generated with ChemDraw 15.0 – Christoph H. May 24 '17 at 17:17
  • That's a ChemDraw-problem, not a tex problem. The string "TMP" is only in the 15.0 version but not in the other. So it can't be replaced. – Ulrike Fischer May 24 '17 at 18:19
  • Okay so whats your suggestion? Sticking with ChemDraw 15? By the way somebody else already posted that Error back in January here on the PerkinElmer Support Forum – Christoph H. May 24 '17 at 20:11
  • I don't have chemdraw. Check if there are some options to change the eps export, e.g. the eps-version. Or ask the support of the software. – Ulrike Fischer May 24 '17 at 20:22
  • @ChristophH. the link to the .eps files no longer works – szentsas Jun 20 '18 at 15:54
2

I had the same issue and it appears that ChemDraw handles text differently depending on how it is entered.

When you create a text box and type into it, it will store it as a string correctly in the EPS. However, it was (sometimes) automatically putting it into chemical formula mode - so that in TMP1, the 1 was subscript (TMP1). Even if you fix this manually, it now saves the TMP and 1 separately in the EPS, meaning CHemNum fails to find TMP1.

Example of the bottom of an EPS file which works:

0 12 0 tx
(TMP)show
0 12 0 tx
(1)show
gr
gr
end
%%Trailer
showpage

This can be manually fixed in the EPS file by changing to:

0 10 0 tx
(TMP1)show
gr
gr
end
%%Trailer
showpage

(I dont know why that 12 changes to a 10, but it seems to when you fix it in ChemDraw).

Alternatively, when making the text box ensure it is in the correct type style to begin with.

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.