I am writing a document in which I would like to include images in PNG format as well as EPS files. The EPS files are chemical structures that I need to number with the chemnum package. When I compile the file including only the EPS with Pdflatex and shell-escape, it works perfectly fine and I get the chemical structure with the tag being replaced by a number. If, however, I place a PNG before the EPS, the EPS is not displayed anymore after the next compilation, only the caption. I am using Miktex 2.9.7206 and Texstudio 2.12.14.
Am I missing something here?
A MWE for the case in which it works:
Code: Select all
\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{auto-pst-pdf}
\usepackage{chemnum}
\begin{document}
\begin{figure}
\replacecmpd{compound}
\includegraphics[scale=1]{E:/test/test_eps}
\caption{Some caption.}
\end{figure}
\end{document}
A MWE causing the described problem:
Code: Select all
\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{auto-pst-pdf}
\usepackage{chemnum}
\begin{document}
\begin{figure}
\includegraphics[scale=1]{E:/test/test_png}
\caption{Some caption.}
\end{figure}
\begin{figure}
\replacecmpd{compound}
\includegraphics[scale=1]{E:/test/test_eps}
\caption{Some caption.}
\end{figure}
\end{document}
test.tex Bad Box Line 20 Overfull \hbox (810.0003pt too wide) in paragraph
test.tex Warning Line 22 Float too large for page by 632.50029pt
test.tex Warning 'test-pics.pdf' contains 2 pages (pst-pdf) but 1 pages are requested: (pst-pdf) File 'test-pics.pdf' is no more valid! (pst-pdf) Recreate it.
I get what it means, but I don't understand why it occurs if a PNG is loaded before. Also, several EPS figures are fine, but as soon as one PNG in included, it stops working.
Is there someone who can help me out with this and shed some light on the matter?
Cheers
Steffen