3

This question already has an answer here:

Here's my MWE:

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

\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\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:

pgf-blur glitch

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?

marked as duplicate by Ulrike Fischer xetex Aug 9 '18 at 13:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Seems to be a bug. I can confirm the problem on XeTeX 3.14159265-2.6-0.99996 (TeX Live 2016/Debian) – koleygr Mar 2 '18 at 10:25
  • 2
    I can confirm that the problem is still present in with an up-to-date xelatex from texlive2017. – user36296 Mar 2 '18 at 10:30
  • Would using lulatex be a workaround? – user36296 Mar 2 '18 at 10:31
  • @samcarter not really, my IDE (RStudio) doesn't support lualatex – jmjr Mar 2 '18 at 10:47
  • @jmjr According to support.rstudio.com/hc/en-us/community/posts/200637578/comments/… lualatex might work in rstudio – user36296 Mar 2 '18 at 11:00
1

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

\documentclass[9pt]{beamer}  

\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\usetikzlibrary{backgrounds}

\tikzset{blurredShadow/.style 2 args={rectangle, thick, draw=none, minimum
width=#1, minimum height=#2, 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={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
  • 1
    @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

Not the answer you're looking for? Browse other questions tagged or ask your own question.