0

I wan't to use chemnum to number my chemicals in my document. The pictures are included as .eps files with temporary tags under the numbered structures. To acomplish that I use the auto-pst-pdf package mentioned in the documentation of chemnum.

The first problem I face is that after compiling the following appears in the compiler log

C:\texlive\2023\bin\windows\runscript.tlu:921: command failed with exit code 12: perl.exe c:\texlive\2023\texmf-dist\scripts\latexmk\latexmk.pl -shell-escape -synctex=1 -interaction=nonstopmode -file-line-error -pdf -outdir=c:/Users/hugel/OneDrive/Desktop/mwe c:/Users/hugel/OneDrive/Desktop/mwe/mwe

If i compile with auto-pst-pdf disabeled after recieving this message the right numbering shows up. Also in the mwe-pics.pdf file created after recieving the message the numbering is correct. This problem also appears if I'm not using chemnum.

As soon as I compile with the hyperref package loaded the mwe-pics.pdf file just shows a blank page and I get a Float too large for page by 209.65544pt. error.

It should look like the following picture:

enter image description here

The test.eps file looks like this:

enter image description here

Apparantly auto-pst-pdf is only needed wehen compiling with pdfLaTeX. Compiling with XeLaTeX instead of pdfLaTeX gives me the following result:

enter image description here

Unfortunatley I dont't know how to upload the original test.eps file.

I'm using TexLive as distrbution and VSCodium as editor. I'm using the following MWE:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[]{auto-pst-pdf}%option "off" to disable the package
\usepackage{graphicx,chemnum}
\usepackage{hyperref}
\begin{document}
\begin{figure}
    \replacecmpd{acid}
    \replacecmpd{alcohol}
    \replacecmpd{ester}
    \includegraphics{test}%test.eps located in the same folder as the .tex file
\end{figure}
\end{document}
Hugel
  • 21
  • auto-pst-pdf doesn't work well anymore as the preview package has not been adapted to changes to latex. You can try some work arounds, e.g. https://tex.stackexchange.com/a/617267/2388 and https://tex.stackexchange.com/a/574157/2388, but I would avoid to use auto-pdf-pdf in a large document, better create small standalone graphics that you include in your document. – Ulrike Fischer Jul 02 '23 at 09:39
  • Thanks for the answer. I also found an answer to my question here: link I also tried to compile in XeLaTeX because apparently auto-pst-pdf is only needed when compiling in pdfLaTeX. The result is shown in my edited question. @UlrikeFischer – Hugel Jul 02 '23 at 12:45
  • 1
    I think it is a misunderstanding that auto-pst-pdf is needed only for pdfLaTeX. In fact, you need the auto-pst-pdf for psfrag to work, which is what chemnum uses to change the tags (default TMP1, TMP2, ...). It is sad that this is broken and seemingly not be fixed. I have a document with 248 figures (eps files) that need replacements with chemnum. I will try to share the hacky fix I currently use, though this was breaking on several occasions with updated packages. – lcnittl Nov 15 '23 at 17:29

0 Answers0