running pdflatex --enable-write18 myfile.tex under emacs+MikTeX works, but, generates a myfile-autopp.pdf with the graphic and doesn't include it to the myfile.pdf.

How to get the graphic inside the original document?


[SOLVED] : 1°) Close Emacs (handle on MiKTeX file system) ; 2°) Update MiKTeX (several times, until up to date) ; 3°) Add "[crop=off]" option to "auto-pst-pdf" package, as proposed by @Herbert ; 4°) Recompile : (with Emacs) a) "M-x compile" b) "pdflatex --enable-write18 myfile.tex"

  • 1
    Welcome to TeX SX! Could you post a full compilable code? – Bernard Jul 30 '17 at 18:31
  • sure : \documentclass[a4paper,12pt]{book} \usepackage{pstricks,pst-plot,pst-text,pst-tree,pst-eps,pst-fill,pst-node,pst-math} \usepackage{auto-pst-pdf} \begin{document} \begin{pspicture} \psframe*[linecolor=blue](10,10) \end{pspicture} \end{document} – thomasb Jul 30 '17 at 19:07
  • I have no problem with this code. Did you really launch the compiler with the switch --enable-write18? Does it work from the command line? – Bernard Jul 30 '17 at 19:26
  • @Bernard from the command line : "M-x compile", then "pdflatex --enable-write18 myfile.tex". but MiKTeX wasn't up to date : emacs had a handle in it's file system... retrying – thomasb Jul 30 '17 at 19:55
  • @Bernard it's solved : emacs had a handle on MiKTeX that prevented the updates... Thanks – thomasb Jul 30 '17 at 21:07

A missing image is often a missing Perl installation which is needed for pdfcrop. In such a case use

  • [crop=off] leads to the "! Undefined control sequence. \Gin@setfile ...Gin@page \@empty \else (\Gin@page )\fi } l.6 \psframe *[linecolor=blue](10,10) ? " error – thomasb Jul 30 '17 at 19:12
  • I cannot see it with up-to-date TeXLive2017. Is your MikTeX up-to-date? – user2478 Jul 30 '17 at 19:14
  • update "Unsuccesful" ; "permission denied: path=c:\Users\myuser\AppData\Local\MiKTeX\2.9\miktex/data/le\df2c24cb21984fa85003c1ecc818ff83.fndb" – thomasb Jul 30 '17 at 19:23
  • @user140297: did you install MikTeX as User or admin? – user2478 Jul 30 '17 at 19:32
  • @Herbert as user... trying to update after closing emacs, maybe it had a handle, then reinstalling miktek. – thomasb Jul 30 '17 at 19:35

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.