I updated MacTeX recently with TeX Live Manager and I installed the last tikz/pgf CVS (02/12/2011) and I got a problem with the standalone class. The size of the picture seems fine but nothing is drawn.
I don't know if it's possible to find a workaround. I compiled the next code with latex no problem with pdflatex.
\documentclass{article}
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\begin{document}
\begin{tikzpicture}
\draw[fill] (0,0)rectangle(5,5);
\end{tikzpicture}
\end{document}
or with
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[fill] (0,0)rectangle(5,5);
\end{tikzpicture}
% or \tikz \draw[fill] (0,0) rectangle (5,5);
% or \tikz{\draw[fill] (0,0) rectangle (5,5)} % with pgf 2.10 cvs
\end{document}
The log file gives :
This is dvips(k) 5.991 Copyright 2011 Radical Eye Software (www.radicaleye.com) ' TeX output 2011.12.12:0630' -> standalone.ps . 1 Error: /undefined in pgfo Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1894 1 3 %oparray_pop 1893 1 3 %oparray_pop 1877 1 3 %oparray_pop 1771 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1154/1684(ro)(G)-- --dict:0/20(G)-- --dict:81/200(L)-- --dict:100/300(L)-- Current allocation mode is local Last OS error: 2 Current file position is 9241 GPL Ghostscript 9.02: Unrecoverable error, exit code 1
If you want the tikz/pgf CVS package with pgfmanual_cvs.pdf, you can find it here.
\tikz \draw[fill] (0,0) rectangle (5,5);but not\tikz{\draw[fill] (0,0) rectangle (5,5)}. – kiss my armpit Dec 12 '11 at 06:52\tikz{\draw[fill] (0,0) rectangle (5,5)}compiles witharticle classand I've the same problem with\tikz \draw[fill] (0,0) rectangle (5,5);. Do you make a try with the last pgf cvs ? Perhaps my problem comes from the last version of MacTeX ! – Alain Matthes Dec 12 '11 at 07:00previewpackage andarticleclass to diagnose whether the error is caused bypreviewencapsulated instandaloneclass. – kiss my armpit Dec 12 '11 at 07:04\tikz \draw[fill] (0,0) rectangle (5,5);and also with (notice the semicolon location!)\tikz {\draw[fill] (0,0) rectangle (5,5);}and shows two black squares as intended. – percusse Dec 12 '11 at 07:12\tikz{\draw[fill] (0,0) rectangle (5,5)}I was also surprised but with pgf CVS, the code compiles with another class. But\tikz \draw[fill] (0,0) rectangle (5,5);is preferable ! – Alain Matthes Dec 12 '11 at 07:13\tikz{\draw[fill] (0,0) rectangle (5,5)}is fine only with pgf 2.1 version CVS but with the new preview package or the standalone class. pgf 2.1 cvs is not also the problem because I have the bad result with the official pgf. The culprit seems to bepreview package– Alain Matthes Dec 12 '11 at 07:24This is dvips(k) 5.991but I did not react. After some tests, I kept my editor with in the preferences :latex. The problem is not withpdflatexbut withdvips .... – Alain Matthes Dec 12 '11 at 08:28previewwhich will be enabled by default. You can test the beta version, see http://chat.stackexchange.com/transcript/41?m=2621195#2621195. – Martin Scharrer Dec 12 '11 at 11:27