[Tex/LaTex] chemnum package

chemnumcross-referencing

The following minimal code using the chemnum package was designed to replace TMP1, TMP2 and TMP3 in an eps file made by ChemDraw by numbers:

\documentclass{article}
\usepackage{graphicx}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{chemnum}

\newenvironment{scheme}{}{}

\begin{document}

\begin{scheme}
    \cmpdref{ref:nucleophile1}
    \cmpdref{ref:nucleophile2}
    \cmpdref{ref:nucleophile3}
    \includegraphics[scale=0.6]{aziridineopening}
\end{scheme}

\end{document}

A copy of the eps file can be found here. Is this problem due to my eps file or my code?

Best Answer

(Summarising my comments into an answer.)

The most common issue when using auto-pst-pdf is a failure of the conversion after the LaTeX run. Here, in the log we find

Package auto-pst-pdf Warning: 
    Creation of minimum-pics.pdf failed.
This warning occured on input line 124.

As the file compiles without errors with pdfLaTeX, the most likely explanation is that pdfcrop is failing to run: this is the final step of the conversion process. In particular, pdfcrop will not work 'out of the box' on Windows. Thus a solution may well be to use

\usepackage[crop=off]{auto-pst-pdf}
Related Question