# Draft option in TikZ like graphicx

We know the use of [draft] in graphicx package

\usepackage[draft]{graphicx}


Do we have any option like [draft] in tikz? Sothat we need not compile the tikz picture for every run and need not look at the picture...Is it possible to have something like this?

\usepackage[draft]{tikz}


or do i have any other method to do it?

-

You can use \tikzexternalize which is intended to speed up compile times. It converts each tikzpicture into a separate external graphic which is then imported with \includegraphics. And in [draft] mode graphics that are included from external sources do not get displayed.

Here is an example of enabling \tikzexternalize when in [draft] mode. With \documentclass[draft]{article} the MWE produces:

## Code:

\documentclass{article}
\usepackage{ifdraft}

\usepackage{tikz}
\ifoptionfinal{}{%
\usetikzlibrary{external}\tikzexternalize
}

\begin{document}
\begin{tikzpicture}
\draw[fill=yellow] (0,0) -- (3,0) -- (3,3) -- cycle;
\end{tikzpicture}
\end{document}

-
This doesn't really work here for me: ! Package tikz Warning: The key 'up to date check=md5' is impossible, there is no macro to compute MD5. Falling back to 'up to date check=diff'. ===== 'mode=convert with system call': Invoking 'xelatex -halt-on-error -interaction=batchmode -jobname "tikzext-figure0" "\def\tikzexternalrealjob{tikzext}\input{tikzext}"' ======== – buhtz Oct 31 '15 at 13:30
@buhtz: I am guessing but I think you just need to delete the temporary files an re-run. If that does not solve your problem, I'd suggest you post a new question. – Peter Grill Oct 31 '15 at 22:15