# is it possible to include tikz picture from a file

I have a tikz picture in a tex file

\begin{figure}[ht!]
\begin{center}
\resizebox{.4\textwidth}{!}{\begin{tikzpicture}[
....

\end{tikzpicture}}
\end{center}
\end{figure}


The ... portion is quite long. Is it possible to put the ... portion in a file and load it with code like \include...?

-
You could simply use \input. –  Stefan Kottwitz Aug 3 '12 at 12:12
–  Ahmed Musa Aug 3 '12 at 13:41

\documentclass{article}
\usepackage{filecontents}

\begin{filecontents*}{tikzcode.tex}
\documentclass[tikz]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\fill[red] (1,2) circle (3);
\end{tikzpicture}
\end{document}
\end{filecontents*}

\usepackage{tikz}
\usepackage{standalone}
\begin{document}
\input{tikzcode.tex}
\end{document}

-
I almost forgot that I have answered this question. –  kiss my armpit Oct 30 '12 at 17:05