13
  • TeX Live 2013

  • I am using pdflatex

  • TeXstudio 2.7.0

  • Win 7 64 bit

  • Taken from the .log file, via \listfiles: tikz.sty 2013/12/13 v3.0.0 (rcs-revision 1.142)

This...

MWE

\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}

... leads to:

Picture:

enter image description here

File list

For the sake of completeness, per percusse's request:

*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
henry
  • 6,594

2 Answers2

15

i had the same issue, try using

\tikzexternalize[optimize=false,prefix=PREFIX]

i dont know why but the option optimze=false solved the problem

Good Luck!

Philip
  • 151
  • 2
  • 1
    Wow! I had the same issue and your solution worked for me. I'm curious about the how and why! – Gilles Bonnet Dec 08 '16 at 14:35
  • 1
    Though this is ancient, same for me. Creating a beamer presentation, there were no more external pdfs created from some point on. No idea why, but disabling the optimisation somehow solved the problem... – Ktree Jul 05 '20 at 06:56
12

Make sure that you include --shell-escape parameter when invoking pdflatex.

In TeXStudio, click on the following menu

Options > Configure TeXStudio > Commands

and change

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

into

pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex
Tahtisilma
  • 2,396
  • Is there any solution for latexmk considering all other constraints are the same. – lony Nov 16 '14 at 15:11
  • Answering my own comment, there is one. Just updating this command as well, similar to latexmk -pdf -silent -pdflatex="pdflatex --shell-escape -synctex=1 %%O %%S" % – lony Nov 16 '14 at 15:33