![下列图表 TikZ 图片为何无法编译?](https://linux22.com/image/449220/%E4%B8%8B%E5%88%97%E5%9B%BE%E8%A1%A8%20TikZ%20%E5%9B%BE%E7%89%87%E4%B8%BA%E4%BD%95%E6%97%A0%E6%B3%95%E7%BC%96%E8%AF%91%EF%BC%9F.png)
我无法编译以下内容:
我明白了
! Package tikz Error: Sorry, image externalization failed: the resulting image
was EMPTY. I tried to externalize 'x', but it seems there is no such image in t
he 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 -halt-on-error -interaction=
batchmode -jobname "x" "bipartite-complete-bipartite-graphs"' *manually* (also
check the preceeding externalized images, perhaps the file name sequence is not
correct).
Repeat: the resulting image was EMPTY, your attention is required .
See the tikz package documentation for explanation.
Type H <return> for immediate help.
...
l.111 \end{document}
但显然代码和图片都在那里。我不是 tikz 专家,但它似乎也来自一本书,为什么它不能编译?
答案1
该行\tikzexternalize{bipartite-complete-bipartite-graphs}
要求您的电流\jobname
正好是bipartite-complete-bipartite-graphs
。这可以通过将示例保存为该名称(加上.tex
扩展名)或使用选项运行 pdflatex 来实现-jobname <desired jobname>
。请参阅 pgfmanual (pdf,网络),第52.4.5节“流程详情“获取更多信息。
使用\tikzexternalize
不带任何参数的 tikz 外部化功能就足以编译示例。如果您想要编译此示例,而不是整本书,那么外部化也是不必要的,因为@Simon Dispa 在评论中建议。