Hi Dylan, Dylan Thurston writes: > preview-latex appears to get confused by tikz calc syntax, which > includes a dollar sign. Here is a minimal file: > ------------------------------------------------------------ > \documentclass{article} > \usepackage{tikz} > \usetikzlibrary{calc} > > \begin{document} > \[ > \begin{tikzpicture}[x=1.5cm] > \node (S1) at (0,1) {$S_1$}; > \node (D1) at (1,1) {$D_1 \setminus V_1$}; > \node (V1) at (2,1) {$V_1$}; > \node at ($(S1.east)!0.5!(D1.west)$) {$\sqcup$}; > \node at ($(D1.east)!0.5!(V1.west)$) {$\sqcup$}; > \end{tikzpicture} > \] > \end{document} > > %%% Local Variables: > %%% mode: latex > %%% TeX-master: t > %%% End: > ------------------------------------------------------------ Your example works for me if I give preview-latex 2 hints: 1) Don't touch $ in order to keep tikz happy 2) Tell preview-latex that it should render tikzpicture environment. Then your document would look like this: --8<---------------cut here---------------start------------->8--- \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usepackage[displaymath,floats,graphics,footnotes, % textmath %% Don't touch $ %% ]{preview} \PreviewEnvironment[{[]}]{tikzpicture} \begin{document} Text \[ \begin{tikzpicture}[x=1.5cm] \node (S1) at (0,1) {$S_1$}; \node (D1) at (1,1) {$D_1 \setminus V_1$}; \node (V1) at (2,1) {$V_1$}; \node at ($(S1.east)!0.5!(D1.west)$) {$\sqcup$}; \node at ($(D1.east)!0.5!(V1.west)$) {$\sqcup$}; \end{tikzpicture} \] Text \begin{tikzpicture}[x=1.5cm] \node (S1) at (0,1) {$S_1$}; \node (D1) at (1,1) {$D_1 \setminus V_1$}; \node (V1) at (2,1) {$V_1$}; \node at ($(S1.east)!0.5!(D1.west)$) {$\sqcup$}; \node at ($(D1.east)!0.5!(V1.west)$) {$\sqcup$}; \end{tikzpicture} Text \end{document} --8<---------------cut here---------------end--------------->8--- where preview-latex in Emacs looks like this: