使用 tikzscale 和 hyperref 时崩溃

使用 tikzscale 和 hyperref 时崩溃

在更新MiKTeX以解决另一个问题之后,我破坏了一些东西,因为以下 MWE 不再生成外部化pdf

\documentclass{report}

\usepackage{filecontents}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage{tikzscale}
\usepackage{hyperref}

\graphicspath{{Figures/}}
\usepgfplotslibrary{external}
\tikzexternalize[prefix=Figures/]

\begin{document}

\begin{filecontents}{test.tikz}
  \begin{tikzpicture}
    \draw[very thick] (0,0) -- (1,0);
  \end{tikzpicture}
\end{filecontents}

\tikzsetnextfilename{test}
\includegraphics{test}

\end{document}

编译此 MWE 可得出:

    The command '\includegraphics []{\tikzscale@fileName }' has been optimized away
. Use '/tikz/external/optimize=false' to disable this.

! Package tikz Error: Sorry, image externalization failed: the resulting image 
was EMPTY. I tried to externalize 'Figures/test', but it seems there is no such
image in the document!?  
   You are currently using 'mode=convert with system call'. This problem can ha
ppen if the image (or one of the images preceeding it) was declared inside of a
 \label{} (i.e. in the .aux file): 'convert with system call' has no access to 
the main aux file.
   Possible solutions in this case:
   (a) Try using 'mode=list and make',
   (b) Issue the externalization command 'pdflatex -shell-escape -halt-on-error
 -interaction=batchmode -jobname "Figures/test" "\def\tikzexternalrealjob{Thesi
s}\input{Thesis}"' *manually* (also check the preceeding externalized images, p
erhaps the file name sequence is not correct).
   Repeat: the resulting image was EMPTY, your attention is required .

当我省略\usepackage{hyperref}\graphicspath{..}或 时[prefix=Figures/],编译正常。可能是什么问题?

相关内容