2

Recently, I was forced to reinstall my MikTeX distribution. Now, in documents that compile without an actual tex error, there are missing graphics that I have included as eps-files. The following error, however, appears:

MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1.

I am using pdflatex in conjunction with the auto-pst-pdf package to be able to use eps-graphics in pdflatex.

I installed the following version: basic-miktex-2.9.5105-x64, all packages were updated today. However, I have also tried the x32 version, with the same result.

Unfortunately, I am not really able to locate the problem and produce a MWE. It seems like deleting parts of the document makes the graphics appear, and, more importantly, adding more graphics makes the document not compile without an error anymore, even though I am sure that the exact same document compiled nicely when I used my initial configuration.

I have read the related questions:

auto-pst-pdf throws 'MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1'

Ghostscript 8.57: Unrecoverable error, exit code 1

However, they don't mention missing images or similar things.

Any ideas on how to fix the problem?


Interestingly, the document compiles with latex without any errors and all images are displayed. With pdflatex i don't see the images, but get the warning that the floats are way too large for the page.

In the meantime, I have also installed tex-live and other versions of miktex, all of them leading to the same error.


As has been pointed out in the comments, auto-pst-pdf is not necessary to be able to use eps files with pdflatex. Switching from this package to epstopdf solves part of the problem: The document compiles without errors and all graphics are included. However I would like to be able to use psfrag on my figures. When I do so with epstopdf the tags are not replaced, i.e. i need to use auto-pst-pdf or pstool (see below).


I was able to produce a MWE:

\documentclass[]{scrreprt}
\usepackage[english]{babel}
\usepackage[onehalfspacing]{setspace}
\frenchspacing
\usepackage{siunitx}
\usepackage{psfrag}
\usepackage{pstool}
\usepackage{graphicx}
\usepackage[scaled=.83]{beramono}
\usepackage[libertine]{newtxmath}
\usepackage{chemnum}
\usepackage{chemgreek}
\selectchemgreekmapping{newtx}
\usepackage{chemmacros}
\chemsetup[nmr]{
  delta = (ppm) ,
  pos-number = side ,
  use-equal,
  format = \bfseries,
  list=true ,
  coupling-nuclei-pre = { },
  coupling-nuclei-post = { } ,
  coupling-pos = sub,
 % coupling-pos-cs = \ensuremath , % <<< added
  atom-number-cs = \ensuremath    % <<< added
}
\sisetup{
  separate-uncertainty ,
  per-mode = symbol ,
  range-phrase = -- ,
  detect-mode = false ,
  detect-weight = true ,
  mode = text ,
  text-rm = \libertineLF % use libertine with lining figures
}

\begin{document}

Testing psfrag:
\begin{figure}[htbp]
\centering
\psfragfig*[scale=1.0]{./intro/test}{\replacecmpd[tag=test]{test}\replacecmpd[tag=rrr]{rrr}}  
\caption{Test}\label{fig:test}
\end{figure}

\end{document}

It seems that chemmacros is producing the error, because if a remove it, all tags are replaced correctly. I get exactly the same error if i use auto-pst-pdf instead of pstool.


Here is a dropbox link of all files used and created during compilation:

https://www.dropbox.com/sh/jtxchech4r20pfw/AACHdaxVNyzgQi-uT3CABFGka?dl=0

  • Did you try Herbert's solution for the problem with auto-pst-pdf? Are you using TiKZ/PGF? – cfr Dec 29 '14 at 2:46
  • Yes, i tried what Herbert suggested, but without success. – Vlad030691 Dec 29 '14 at 2:59
  • Try converting the files at the command line. You might get more informative output. – cfr Dec 29 '14 at 3:03
  • 1
    Dear texenthusiast, thanks for your suggestions, but using auto-pst-pdf does not lead to a solution. The problem is that the way you describe it, worked for me prior to reinstalling everything, now however it doesn't. I found that chemnum works with pstool and the problem is solved if the option crop=pdfcrop is used. Nevertheless, thank you for your help and time. – Vlad030691 Dec 29 '14 at 23:30
  • 2
    @cgnieder the code snippet \psfragfig*[scale=1.0]{./intro/test}{\replacecmpd[tag=test]{test}\replacecmpd[t‌​ag=rrr]{rrr}} works well with [crop=pdfcrop] in \usepackage[crop=pdfcrop]{pstool} finally. Thats what OP Vlad030691 also noticed in the above upvoted comment. So in conclusion crop=off and crop =pdfcrop are good options for auto-pst-pdf and pstool respectively with package chemnum. May be you can include this option in a example Fig 5 : Using Pstool with chemnum example in chenum manual. but these options work in case to case basis, users may use with caution – texenthusiast Dec 30 '14 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.