latexmk 使用 auto-pst-pdf 和 hyperref 时出错

latexmk 使用 auto-pst-pdf 和 hyperref 时出错

如果我们编译

\documentclass[a4paper]{article}
\usepackage[pdftex]{hyperref}
\usepackage{pstricks,auto-pst-pdf}
\begin{document}
\tableofcontents
\section{Curves}
\begin{postscript}
\begin{pspicture}
\psccurve[showpoints=true](1,1)(2,2)(2,1)(1,2)
\end{pspicture}
\end{postscript}
\end{document}

使用latexmkvia pdflatex -shell-escapelatexmk给出以下消息。

Rule 'pdflatex': Rules & subrules not known to be previously run:
   pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
      'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -shell-escape -synctex=1  -recorder  "a.tex"'
------------
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 \write18 enabled.
entering extended mode
(./a.tex
LaTeX2e <2011/06/27>
...
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/size10.clo))
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/home/jasperloy/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver: hpdftex.

(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/pstricks/pstricks.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.tex
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/home/jasperloy/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex)))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv))
`PSTricks' v2.29  <2012/06/04> (tvz)
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.con))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex)
(/home/jasperloy/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/catchfile.sty)
(./a.w18)) 
-------------------------------------------------
auto-pst-pdf: Auxiliary LaTeX compilation
-------------------------------------------------
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
entering extended mode
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
' TeX output 2012.08.20:0705' -> a-autopp.ps
</home/jasperloy/texlive/texmf/dvips/base/tex.pro>
</home/jasperloy/texlive/texmf/dvips/config/alt-rule.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pstricks.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-algparser.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-tools.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-dots.pro>
</home/jasperloy/texlive/texmf/dvips/base/special.pro>. [1] 
PDFCROP 1.33, 2012/02/01 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `a-pics.pdf'.
-------------------------------------------------
auto-pst-pdf: End auxiliary LaTeX compilation
-------------------------------------------------
 (/home/jasperloy/texlive/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/preview/preview.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/dvips.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/environ/environ.sty))) (./a.aux)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(/home/jasperloy/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
Preview: Fontsize 10pt
Preview: PDFoutput 1
<a-pics.pdf, id=5, page=1, 43.16125pt x 33.12375pt> <use a-pics.pdf, page 1>
[1
Non-PDF special ignored!
Non-PDF special ignored!{/home/jasperloy/texlive/texmf-var/fonts/map/pdftex/upd
map/pdftex.map} <./a-pics.pdf>] (./a.aux)

Package rerunfilecheck Warning: File `a.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.

 )</home/jasperloy/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb
></home/jasperloy/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on a.pdf (1 page, 18591 bytes).
SyncTeX written on a.synctex.gz.
Transcript written on a.log.
Latexmk: References changed.
Latexmk: Log file says output to 'a.pdf'
Rule 'pdflatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'a.aux'
      'a.out'
------------
Run number 2 of rule 'pdflatex'
------------
------------
Running 'pdflatex -shell-escape -synctex=1  -recorder  "a.tex"'
------------
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 \write18 enabled.
entering extended mode
(./a.tex
LaTeX2e <2011/06/27>
...
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/size10.clo))
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/home/jasperloy/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver: hpdftex.

(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/pstricks/pstricks.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.tex
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/home/jasperloy/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex)))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv))
`PSTricks' v2.29  <2012/06/04> (tvz)
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.con))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex)
(/home/jasperloy/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/catchfile.sty)
(./a.w18)) 
-------------------------------------------------
auto-pst-pdf: Auxiliary LaTeX compilation
-------------------------------------------------
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
entering extended mode
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
' TeX output 2012.08.20:0705' -> a-autopp.ps
</home/jasperloy/texlive/texmf/dvips/base/tex.pro>
</home/jasperloy/texlive/texmf/dvips/config/alt-rule.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pstricks.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-algparser.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-tools.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-dots.pro>
</home/jasperloy/texlive/texmf/dvips/base/special.pro>. [1] 
PDFCROP 1.33, 2012/02/01 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `a-pics.pdf'.
-------------------------------------------------
auto-pst-pdf: End auxiliary LaTeX compilation
-------------------------------------------------
 (/home/jasperloy/texlive/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/preview/preview.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/dvips.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/environ/environ.sty))) (./a.aux)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./a.out) (./a.out)
(/home/jasperloy/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
Preview: Fontsize 10pt
Preview: PDFoutput 1
(./a.toc) <a-pics.pdf, id=10, page=1, 43.16125pt x 33.12375pt>
<use a-pics.pdf, page 1> [1
Non-PDF special ignored!
Non-PDF special ignored!{/home/jasperloy/texlive/texmf-var/fonts/map/pdftex/upd
map/pdftex.map} <./a-pics.pdf>] (./a.aux) )</home/jasperloy/texlive/texmf-dist/
fonts/type1/public/amsfonts/cm/cmbx10.pfb></home/jasperloy/texlive/texmf-dist/f
onts/type1/public/amsfonts/cm/cmbx12.pfb></home/jasperloy/texlive/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on a.pdf (1 page, 28614 bytes).
SyncTeX written on a.synctex.gz.
Transcript written on a.log.
Latexmk: Log file says output to 'a.pdf'
Rule 'pdflatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'a-pics.pdf'
      'a.toc'
------------
Run number 3 of rule 'pdflatex'
------------
------------
Running 'pdflatex -shell-escape -synctex=1  -recorder  "a.tex"'
------------
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 \write18 enabled.
entering extended mode
(./a.tex
LaTeX2e <2011/06/27>
...
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/size10.clo))
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/home/jasperloy/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver: hpdftex.

(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/pstricks/pstricks.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.tex
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/home/jasperloy/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex)))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv))
`PSTricks' v2.29  <2012/06/04> (tvz)
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.con))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex)
(/home/jasperloy/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/catchfile.sty)
(./a.w18)) 
-------------------------------------------------
auto-pst-pdf: Auxiliary LaTeX compilation
-------------------------------------------------
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
entering extended mode
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
' TeX output 2012.08.20:0705' -> a-autopp.ps
</home/jasperloy/texlive/texmf/dvips/base/tex.pro>
</home/jasperloy/texlive/texmf/dvips/config/alt-rule.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pstricks.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-algparser.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-tools.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-dots.pro>
</home/jasperloy/texlive/texmf/dvips/base/special.pro>. [1] 
PDFCROP 1.33, 2012/02/01 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `a-pics.pdf'.
-------------------------------------------------
auto-pst-pdf: End auxiliary LaTeX compilation
-------------------------------------------------
 (/home/jasperloy/texlive/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/preview/preview.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/dvips.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/environ/environ.sty))) (./a.aux)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./a.out) (./a.out)
(/home/jasperloy/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
Preview: Fontsize 10pt
Preview: PDFoutput 1
(./a.toc) <a-pics.pdf, id=10, page=1, 43.16125pt x 33.12375pt>
<use a-pics.pdf, page 1> [1
Non-PDF special ignored!
Non-PDF special ignored!{/home/jasperloy/texlive/texmf-var/fonts/map/pdftex/upd
map/pdftex.map} <./a-pics.pdf>] (./a.aux) )</home/jasperloy/texlive/texmf-dist/
fonts/type1/public/amsfonts/cm/cmbx10.pfb></home/jasperloy/texlive/texmf-dist/f
onts/type1/public/amsfonts/cm/cmbx12.pfb></home/jasperloy/texlive/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on a.pdf (1 page, 28617 bytes).
SyncTeX written on a.synctex.gz.
Transcript written on a.log.
Latexmk: Log file says output to 'a.pdf'
Rule 'pdflatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'a-pics.pdf'
------------
Run number 4 of rule 'pdflatex'
------------
------------
Running 'pdflatex -shell-escape -synctex=1  -recorder  "a.tex"'
------------
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 \write18 enabled.
entering extended mode
(./a.tex
LaTeX2e <2011/06/27>
...
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/size10.clo))
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/home/jasperloy/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver: hpdftex.

(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/pstricks/pstricks.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.tex
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/home/jasperloy/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex)))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv))
`PSTricks' v2.29  <2012/06/04> (tvz)
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.con))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex)
(/home/jasperloy/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/catchfile.sty)
(./a.w18)) 
-------------------------------------------------
auto-pst-pdf: Auxiliary LaTeX compilation
-------------------------------------------------
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
entering extended mode
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
' TeX output 2012.08.20:0705' -> a-autopp.ps
</home/jasperloy/texlive/texmf/dvips/base/tex.pro>
</home/jasperloy/texlive/texmf/dvips/config/alt-rule.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pstricks.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-algparser.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-tools.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-dots.pro>
</home/jasperloy/texlive/texmf/dvips/base/special.pro>. [1] 
PDFCROP 1.33, 2012/02/01 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `a-pics.pdf'.
-------------------------------------------------
auto-pst-pdf: End auxiliary LaTeX compilation
-------------------------------------------------
 (/home/jasperloy/texlive/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/preview/preview.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/dvips.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/environ/environ.sty))) (./a.aux)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./a.out) (./a.out)
(/home/jasperloy/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
Preview: Fontsize 10pt
Preview: PDFoutput 1
(./a.toc) <a-pics.pdf, id=10, page=1, 43.16125pt x 33.12375pt>
<use a-pics.pdf, page 1> [1
Non-PDF special ignored!
Non-PDF special ignored!{/home/jasperloy/texlive/texmf-var/fonts/map/pdftex/upd
map/pdftex.map} <./a-pics.pdf>] (./a.aux) )</home/jasperloy/texlive/texmf-dist/
fonts/type1/public/amsfonts/cm/cmbx10.pfb></home/jasperloy/texlive/texmf-dist/f
onts/type1/public/amsfonts/cm/cmbx12.pfb></home/jasperloy/texlive/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on a.pdf (1 page, 28619 bytes).
SyncTeX written on a.synctex.gz.
Transcript written on a.log.
Latexmk: Log file says output to 'a.pdf'
Rule 'pdflatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'a-pics.pdf'
------------
Run number 5 of rule 'pdflatex'
------------
------------
Running 'pdflatex -shell-escape -synctex=1  -recorder  "a.tex"'
------------
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 \write18 enabled.
entering extended mode
(./a.tex
LaTeX2e <2011/06/27>
...
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/home/jasperloy/texlive/texmf-dist/tex/latex/base/size10.clo))
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/home/jasperloy/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver: hpdftex.

(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/home/jasperloy/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/home/jasperloy/texlive/texmf-dist/tex/latex/pstricks/pstricks.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.tex
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/home/jasperloy/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex)))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv))
`PSTricks' v2.29  <2012/06/04> (tvz)
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pstricks.con))
(/home/jasperloy/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex)
(/home/jasperloy/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/home/jasperloy/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/auto-pst-pdf/auto-pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/catchfile.sty)
(./a.w18)) 
-------------------------------------------------
auto-pst-pdf: Auxiliary LaTeX compilation
-------------------------------------------------
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
entering extended mode
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
' TeX output 2012.08.20:0705' -> a-autopp.ps
</home/jasperloy/texlive/texmf/dvips/base/tex.pro>
</home/jasperloy/texlive/texmf/dvips/config/alt-rule.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pstricks.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-algparser.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-tools.pro>
</home/jasperloy/texlive/texmf-dist/dvips/pstricks/pst-dots.pro>
</home/jasperloy/texlive/texmf/dvips/base/special.pro>. [1] 
PDFCROP 1.33, 2012/02/01 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `a-pics.pdf'.
-------------------------------------------------
auto-pst-pdf: End auxiliary LaTeX compilation
-------------------------------------------------
 (/home/jasperloy/texlive/texmf-dist/tex/latex/pst-pdf/pst-pdf.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/home/jasperloy/texlive/texmf-dist/tex/latex/preview/preview.sty)
(/home/jasperloy/texlive/texmf-dist/tex/latex/graphics/dvips.def)
(/home/jasperloy/texlive/texmf-dist/tex/latex/environ/environ.sty))) (./a.aux)
(/home/jasperloy/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/home/jasperloy/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./a.out) (./a.out)
(/home/jasperloy/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
Preview: Fontsize 10pt
Preview: PDFoutput 1
(./a.toc) <a-pics.pdf, id=10, page=1, 43.16125pt x 33.12375pt>
<use a-pics.pdf, page 1> [1
Non-PDF special ignored!
Non-PDF special ignored!{/home/jasperloy/texlive/texmf-var/fonts/map/pdftex/upd
map/pdftex.map} <./a-pics.pdf>] (./a.aux) )</home/jasperloy/texlive/texmf-dist/
fonts/type1/public/amsfonts/cm/cmbx10.pfb></home/jasperloy/texlive/texmf-dist/f
onts/type1/public/amsfonts/cm/cmbx12.pfb></home/jasperloy/texlive/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on a.pdf (1 page, 28613 bytes).
SyncTeX written on a.synctex.gz.
Transcript written on a.log.
Latexmk: Log file says output to 'a.pdf'
Rule 'pdflatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'a-pics.pdf'
Latexmk: Maximum runs of pdflatex reached without getting stable files
     Use the -f option to force complete processing.
Latexmk: Did not finish processing file:
   'pdflatex' needed too many passes
Latexmk: Use the -f option to force complete processing.
Latexmk: applying rule 'pdflatex'...
Latexmk: Errors, so I did not complete making targets

请注意,输出已被截断以适应最大问题长度。

我怀疑这是因为hyperref程序进行latexmk了额外的检查,检测到auto-pst-pdf每次运行时都会生成新图片,因此尽管最终结果可能是正确的,但还是会给出错误消息。有什么办法可以解决这个问题吗?

答案1

latexmk不断重新运行的原因是生成的a-pics.pdf文件在每次运行时都会发生变化。PDF 文件中的创建日期、修改日期和 ID 行不断变化。至少有两种可能的解决方案。

  1. 告诉从依赖数据库中完全latexmk忽略a-pics.pdf。目前似乎没有公开的接口来执行此操作(并且修改录音文件在本例中不起作用),因此我使用以下 hack 来实现,它重新定义了用于latexmk维护其文件数据库的内部函数。将以下内容放在与latexmkrc主文件相同的目录中的文件中(请注意,这将影响从同一目录启动的tex所有其他运行):latexmk

    undef &get_time_size;
    
    sub my_get_time_size {
       # Return time and size of file named in argument
       # If file does not exist, return (0,-1);
       if ( -e $_[0] && $_[0] ne $root_filename . "-pics.pdf") {
           return get_time_size_raw($_[0]);
       }
       else {
           return (0,-1);
       }
    }
    
    *get_time_size = \&my_get_time_size;
    
  2. 告诉latexmk不要考虑创建日期等的变化以表明文件本身已更改。您可以按如下方式执行此操作:执行latexmkperl 代码$hash_calc_ignore_pattern{'pdf'} = '^/(CreationDate|ModDate|ID) ';。例如,在您的示例的命令行上:

    latexmk -e "\$hash_calc_ignore_pattern{'pdf'} = '^/(CreationDate|ModDate|ID) ';" -pdf -pdflatex="pdflatex --shell-escape  %O  %S" a
    

    a您的工作名称在哪里)。

    或者,您可以将参数的内容添加-e到资源文件中latexmkrc,并适当地更改转义。

    请注意,方法 2 将导致一次不必要的重新运行,但至少它不再会导致无限循环!

  3. 第三种可能的解决方案可能是禁用元数据生成,但这可能不如上述两种方法令人满意。

相关内容