Is it possible to have transparency in a tikz picture while using the preview
package and compiling with xelatex?
The following mwe compiles without warnings/errors under both xelatex and pdflatex but with xelatex there is no transparency. Everything is printed opaque. With pdflatex everything works as expected.
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usepackage[xetex,active,tightpage]{preview}
%\usepackage[pdftex,active,tightpage]{preview}
\PreviewEnvironment[]{tikzpicture}
\begin{document}
\begin{tikzpicture}[line width=1ex]
\draw (0,0) -- (3,1);
\filldraw [fill=red,draw opacity=0.5] (1,0) rectangle (2,1);
\end{tikzpicture}
\end{document}
preview
package and TikZ shadings, most likely also with patterns and transparency. I asstandalone
class author, which usespreview
, got contacted by a user two month ago because of it. I tracked it down to the above combination. The user then wrote an email to thepreview
author, but I didn't heard anything about it ever since. – Martin Scharrer♦ Jun 17 '11 at 13:54preview
+some feature of PGF/TikZ (shadings, patterns, transparency). It works withoutpreview
or with it underpdflatex
. – Martin Scharrer♦ Jun 17 '11 at 14:34