# tikzpicture blank in preview

Using preview-latex to preview the tikzpicture environment shows either a blank rectangle in pdf mode or simply produces no preview file in ps mode.

I am using aquamacs 23.3a, using auctex and gs 9.04.

I tested multiple file format outputs and preview options. I don't see any errors or warning pop up either, so I can't tell for sure if the error lies with ghostscript, auctex or preview.

The following previews a blank for the entire tikzpicture environment.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[draw] {tikz rectangle};
\end{tikzpicture}
\end{document}


Is there a way to see what exactly goes wrong where?

-
Have you tried to create a preview by hand, i.e. using the preview-package in your LaTeX document and \begin{preview} ... \end{preview} ? –  JF Meier Sep 15 '11 at 18:33
It is creating a preview, adding a preview environment around it manually gives the same effect: blank preview. –  Beef Sep 16 '11 at 9:51
Does this only happen with a picture, or also with just a text document? Have you tried viewing the PDF in Adobe Acrobat? –  Peter Grill Sep 16 '11 at 17:53
I'm talking about the preview images generated, the complete pdf generates just fine with text and all. It's just the preview images generated by preview/gs that are empty. –  Beef Oct 13 '11 at 11:37
You could try adding \usepackage[active,float]{preview}\PreviewEnvironment{tikzpicture} as the last package. If that is not enough, try wrapping tikzpicture within a \begin{figure}...\end{figure} as preview-latex might be looking for a float. –  Peter Grill Dec 1 '11 at 17:24

\usepackage[active,float]{preview}

If that is not enough, try wrapping the tikzpicture within a \begin{figure}...\end{figure} as preview-latex` might be looking for a float.