# pgf-blur shadow glitch using different node sizes and XeLaTeX [duplicate]

Here's my MWE:

% !TeX program = XeLaTeX
\documentclass[9pt]{beamer}

\usepackage{tikz}
\usetikzlibrary{backgrounds}

\tikzstyle{blurredShadow} = [rectangle, thick, draw=none, minimum width=1.5cm, minimum height=0.5cm, fill=green!50, blur shadow={shadow opacity=40}]

\begin{document}

\begin{frame}
\begin{center}
\begin{tikzpicture}[node distance=2cm]
tikzstyle{every node}=[font=\scriptsize]

\node (one) {Blabla};
\node (two) [right of=one]{
\begin{tabular}{c}
Blabla \\
\& Blublu \\
\end{tabular}
};

\begin{scope}[on background layer]
\node [blurredShadow, above of=one, yshift=-2cm] { };
\node [blurredShadow, above of=two, yshift=-2cm, minimum height=1.5cm] { };
\end{scope}

\end{tikzpicture}

\end{center}
\end{frame}

\end{document}


gives me this:

The glitch does not occur when compiling with pdfLaTeX. However, I need to use XeLaTex because I need to use the fontspec package.

Linux 64bit Ubuntu 16.04. Tex version: TeX 3.14159265 (TeX Live 2015/Debian)

The following solution to a similar problem did not work for me: Define driver by setting\def\pgfsysdriver{pgfsys-dvipdfmx.def}

Does anyone know a solution?

As a temporary workaround you can pass the height and width to the style.

\documentclass[9pt]{beamer}

\usepackage{tikz}
\usetikzlibrary{backgrounds}

\tikzset{blurredShadow/.style 2 args={rectangle, thick, draw=none, minimum
opacity=40}}}

\begin{document}

\begin{frame}
\begin{center}
\begin{tikzpicture}[node distance=2cm]
tikzstyle{every node}=[font=\scriptsize]

\node (one) {Blabla};
\node (two) [right of=one]{
\begin{tabular}{c}
Blabla \\
\& Blublu \\
\end{tabular}
};

\begin{scope}[on background layer]
\node [blurredShadow={1.5cm}{1.5cm}, above of=two, yshift=-2cm] { };
\node [blurredShadow={1.5cm}{0.5cm}, above of=one, yshift=-2cm] { };
\end{scope}

\end{tikzpicture}
\end{center}
\end{frame}
\end{document}

• Doesn't work for me when using XeLaTeX. Did you try with XeLaTeX? – jmjr Mar 2 '18 at 15:01
• @jmjr Ooops, sorry! Now better? – user121799 Mar 2 '18 at 17:56
• Unfortunately no. Still not working as supposed. – jmjr Mar 2 '18 at 21:54
• @jmjr You won't like it, but on my TeXLive 2017 installation the shadows show correctly if I compile with xelatex. That is, I was able to reproduce your output with your original snippet (and with xelatex), but this one shows the appropriate shadows. – user121799 Mar 3 '18 at 2:13
• Thanks for the hint. I installed texlive 2017 ("vanilla"). Unfortunately shadows are still incorrect (using your code). Do you have any ideas as to why that is? – jmjr Mar 11 '18 at 20:36