2

Im reading below document and trying do that: enter image description here

But I dont know where to put below code:

pdflatex -shell-escape <tex file>

to active it. When I compiled only code inside this document, it showed me below error. Im using texlive to compile in windows.

enter image description here That code here:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize % activate!
\begin{document}
\begin{tikzpicture}
\node {root}
child {node {left}}
child {node {right}
child {node {child}}
child {node {child}}
};
\end{tikzpicture}
A simple image is \tikz \fill (0,0) circle(5pt) ;.
\end{document}
  • @Fran If the OP uses that OS, which we don't know. ? – cfr Jun 18 '17 at 17:53
  • How do you normally compile your LaTeX? All the instructions are telling you to do are to create a directory called figures and then run pdflatex as normal except with the addition of the -shell-escape command line parameter. – TH. Jun 18 '17 at 18:08
  • I dont really know how to use it. I cant compile normally with below code: \documentclass{article} \usepackage{amsmath} \usepackage{tikz,pgf} \usetikzlibrary{arrows,external} \tikzexternalize \begin{document} \begin{tikzpicture} \draw (-4,0.)-- (4.,0.); \end{tikzpicture} \end{document} – Kanegusa199 Jun 18 '17 at 18:33
  • I do not know what the problem may be for you; since the code compiles perfectly fine for me. – EoDmnFOr3q Jun 18 '17 at 19:24
  • You need to put the code in the shell-escape, usually to be found in the settings tab. At least for me, it was set correctly already at the point of installation (TeXshop on mac, 2016 dist). There is a good chance that you don't have to add anything. Just put the \usetikzlibrary{external} and \tikzexternalize at an appropriate place in the pre-amble. Note that if you want to put your figures into a subfolder, you have to create that folder by hand. – Huang_d Jun 18 '17 at 21:35
  • @cfr likelihood calculus: Most people use that OS and most users of that OS do not known what is the command prompt, and moreover seems strange a Linux user asking that. – Fran Jun 18 '17 at 22:52
  • @Fran But not at all strange an OS X user ask that. – cfr Jun 18 '17 at 23:25
  • @cfr, Yes, that user also exist . This is why it was a probability problem :) – Fran Jun 19 '17 at 03:11
  • Please see my edit and show me what should I do to solve it. Thank for your help! – Kanegusa199 Jun 19 '17 at 08:46
  • You still haven't told us whether you're using Windows, Mac or something else. – Chris H Jun 19 '17 at 11:47
  • Im using texmaker and texlive in Windows 10! – Kanegusa199 Jun 19 '17 at 11:53
  • Then @Fran is right. Follow the link. – cfr Jun 19 '17 at 12:46
  • 2
    If you want to configure TeXMaker to compile with shell-escape, see this question. – cp.fe.cp Jun 19 '17 at 21:23

0 Answers0