I have been using the standalone package exactly for this purpose. You create a standalone tex file for each figure and use:
\documentclass[preview=true]{standalone}
and the main files which include this standalone file will need to have the complete preamble including \usepackage{standalone}. Martin Scharrer, the package author provides a good example here.
Alternatively you could use the preview package. Add \usepackage[active, graphics]{preview}, and use the \PreviewEnvironment to specify which environments you want to be extracted.
Here is an example that extracts the two tikzpicture environments on separate pages:
\documentclass{article}
\usepackage{tikz}
\usepackage{lipsum}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{1pt}%
\begin{document}
\lipsum[1]
\begin{tikzpicture}
\draw [red, ultra thick] (0,0) rectangle (1,1);
\end{tikzpicture}
\lipsum[2]
\begin{tikzpicture}
\draw [blue,fill=yellow] (0,0) circle (5pt);
\end{tikzpicture}
\end{document}
texlive-full. Do you know how to get the package (I'm using Ubuntu)? – user Oct 24 '11 at 18:12previewandstandaloneare part of the normal distribution. I have added links to the answer as to where the packages are. – Peter Grill Oct 24 '11 at 18:16standaloneandpreviewand should form part of TeX Live. Install these usingtlmgr. – Werner Oct 24 '11 at 18:17tlmgr. – Martin Scharrer Oct 24 '11 at 18:21sudo tlmgr install preview standaloneon the command line. – Martin Scharrer Oct 24 '11 at 18:25standaloneis at http://mirror.ctan.org/install/macros/latex/contrib/standalone.tds.zip. – Martin Scharrer Oct 24 '11 at 18:27standalonedocument type. The height of my pdf now matches the height of the figure; however, the width is still quite large. Do you know if there is some different setting for the width? – user Oct 24 '11 at 20:22previewenvironment directly. But if you have moved your figures to a separate file, you should post a new question regarding your specific problem with a compilable MWE that illustrates the problem including the\documentclassso that those trying to help don't have to recreate it. – Peter Grill Oct 24 '11 at 20:38