# Why does chemstyle display 'TMP1' rather than compound numbers?

The minimal document below compiles fine but the compound number in the scheme in the PDF output still says 'TMP1' rather than the desired '1'. I drew the scheme in chemdraw, used Helvetica for the TMP1 font, and saved it as an encapsulated postscript file. Any help greatly appreciated!

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{booktabs}
\usepackage[journal=rsc]{chemstyle}
\usepackage{geometry}
\usepackage{lmodern}
\usepackage[version=3]{mhchem}
\begin{document}

\begin{scheme}[h]
\centering
\caption{A scheme that doesn't work.}
\label{hello-figure}
\includegraphics[scale=1.0]{hello}
\schemeref[TMP1]{bocced}
\end{scheme}

Look at compound \compound{bocced}.

\end{document}

-
Could you post a link to an example EPS file? –  Joseph Wright Feb 21 '12 at 16:39
There are two 'likely candidates' for an issue. The first is that some EPS files do not include the text TMP1 (or similar) in one go, but do so in separate parts. The substitution method uses a search-and-replace, and so this will break it. The second issue is if one of the 'additional tools' breaks. That is easiest to pick up using the traditional .dvi route to making PDFs with LaTeX, and reading the logs at each stage. Without an example graphic, it's hard to work out which case applies here. –  Joseph Wright Feb 21 '12 at 16:50

You need to do the substitutions before including the graphic.

The minimal document below compiles fine but the compound number in the scheme in the PDF output still says 'TMP1' rather than the desired '1'. I drew the scheme in chemdraw, used Helvetica for the TMP1 font, and saved it as an encapsulated postscript file. Any help greatly appreciated!

\schemeref[TMP1]{bocced}
\includegraphics[scale=1.0]{hello}


This is due to the way the method actually works: once the graphic has been inserted, no 'editing' is possible.

-
Yes! That fixed it. Such a simple thing. Thank you very much! –  Bazley Feb 22 '12 at 15:46