TikZ 不允许我进行外部化,并会因错误而停止

TikZ 不允许我进行外部化,并会因错误而停止
  • TeX Live 2013

  • 我正在使用 pdflatex

  • TeXstudio 2.7.0

  • Win7 64位

  • 摘自文件.log,通过\listfilestikz.sty 2013/12/13 v3.0.0 (rcs-revision 1.142)

这...

平均能量损失

\documentclass[
a4paper
]{scrartcl}

\usepackage{
newtxtext,
amsmath,
}
\usepackage[T1]{fontenc}

\usepackage{tikz}
\usetikzlibrary{
    external,
    calc,trees,shadows,positioning,arrows,chains,
    decorations.pathreplacing,
    decorations.pathmorphing,
    decorations.shapes,
    decorations.text,
    shapes,
    shapes.geometric,
    shapes.symbols,
    matrix,
    patterns,
    intersections,
    fit
}
\tikzexternalize[shell escape=-shell-escape]
%\tikzexternalize[shell escape=pdflatex -shell-escape] %I used this method as well
\tikzexternalize

\tikzsetexternalprefix{Test/Pictures/}
\tikzsetfigurename{Test01_}

\begin{document}
\begin{center}
\begin{tikzpicture}[font=\sffamily\small]
%
\draw[thick] (0,0) rectangle (25mm, 50mm) node[below,xshift=-12.5mm] {Text.};
%
\end{tikzpicture}
\end{center}
\end{document}

... 导致:

图片:

在此处输入图片描述

文件列表

为了完整起见,根据 percusse 的要求:

*File List*
scrartcl.cls    2013/12/19 v3.12 KOMA-Script document class (article)
scrkbase.sty    2013/12/19 v3.12 KOMA-Script package (KOMA-Script-dependent bas
ics and keyval usage)
 scrbase.sty    2013/12/19 v3.12 KOMA-Script package (KOMA-Script-independent b
asics and keyval usage)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty    2013/12/19 v3.12 KOMA-Script package (loading files)
tocbasic.sty    2013/12/19 v3.12 KOMA-Script package (handling toc-files)
scrsize11pt.clo    2013/12/19 v3.12 KOMA-Script font size class option (11pt)
typearea.sty    2013/12/19 v3.12 KOMA-Script package (type area)
newtxtext.sty    2014/03/18 v1.241
fontaxes.sty    2014/03/23 v1.0d Font selection axes
 xkeyval.sty    2012/10/14 v2.6b package option processing (HA)
 xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
textcomp.sty    2005/09/27 v1.99g Standard LaTeX package
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
 amsmath.sty    2013/01/14 v2.14 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
    tikz.sty    2013/12/13 v3.0.0 (rcs-revision 1.142)
     pgf.sty    2013/12/18 v3.0.0 (rcs-revision 1.14)
  pgfrcs.sty    2013/12/20 v3.0.0 (rcs-revision 1.28)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.0 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.0 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.0 (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.0 (rcs-revision 1.25)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
  ts1cmr.fd    1999/05/25 v2.5h Standard LaTeX font definitions
 t1ntxrx.fd    2012/12/25 v1.0
supp-pdf.mkii
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
   t1qhv.fd    2009/09/25 v1.2 font definition file for T1/qhv

答案1

确保--shell-escape在调用 pdflatex 时包含参数。

在 TeXStudio 中,点击以下菜单

选项 > 配置 TeXStudio > 命令

并改变

pdflatex -synctex=1 -interaction=nonstopmode %.tex

进入

pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex

答案2

我有同样的问题,请尝试使用

\tikzexternalize[optimize=false,prefix=PREFIX]

我不知道为什么,但是选项优化=false解决了问题

祝你好运!

相关内容