3

Here's a MWE:

\documentclass{article}
\usepackage{auto-pst-pdf}

\begin{document}
  \begin{pspicture}(3,3)
    \psline(2,1)
  \end{pspicture}
\end{document}

I'm using MikTeX on Windows 10, all packages updated as of today. If I start just with this source file and use latexmk with the -pdf and -pvc options (my usual workflow), everything is fine. However, once I make some small change like changing (2,1) to (2,2), the PDF is correctly updated, but latexmk is now in an endless loop.

It doesn't make a difference whether I add \usepackage{pstricks} before or after \usepackage{auto-pst-pdf}. Also, \usepackage[pdf]{pstricks} doesn't work for me, I get a "not configured for this format" error message.

Is there a way to stop latexmk behaving this way? I'm aware of this discussion, but I can't see how this can help in my case. Also, that was in 2012 and I was hoping that in 2019 I'd not be the only one trying to use PSTricks with pdflatex and latexmk.

(FWIW, I'm having this problem on two different machines.)

  • 2
    @marmot If you specify just one point, there's a default which will be (0,0) in this case. Anyway, if I write \psline (0,0) (2,1) instead that doesn't solve my endless loop problem. – Frunobulax Jun 13 '19 at 15:57
  • Write the author of latexmk a bug report. – Ulrike Fischer Jun 13 '19 at 17:11
1

When latexmk complains about an infinite loop, it's always worth looking at its output to see what it thinks is the reason for the repeated runs. In this case it is because after every run of pdflatex, there is a change in the *-pics.pdf file generated by the auto-pst-pdf package. Examination of this file on successive runs shows that there are certain lines that always change; these start with /CreationDate, /ModDate and /ID.

By following the method shown in the latexmk documentation, you can solve the problem by telling latexmk to ignore those lines. Put the following in one of latexmk's initialization files:

$hash_calc_ignore_pattern{'pdf'} = '^/(CreationDate|ModDate|ID) ';

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.