下列图表 TikZ 图片为何无法编译?

下列图表 TikZ 图片为何无法编译?

我无法编译以下内容:

https://github.com/IMCG/graph-theory-algorithms-book/blob/master/image/introduction/bipartite-complete-bipartite-graphs.tex

我明白了

! 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 在评论中建议

相关内容