1

Currently, I have my beamer theme so that block environments are transparent. Would it be possible to have them gaussian blurred (blurring obviously the background to create an annoying Windows 7 effect) as well? I think people have found ways to make tikz do this, but what about as a default thing (for every block environment)?

Currently I have this effect: beamer block environment

Why I would want to gauss blur? So I can have more annoying backgrounds in my slides, the blur would make the text in the alert environment readable in a lot of circumstances

  • See as example how the terminal is blurred. It's transparent but one can still read the text no matter what is going on with the desktop

enter image description here

6
  • 1
    This sounds like a very, let's say "adventurous" idea. Your better chance to improve readability is to only make the background semi-transparent instead of also applying this to your font. Aug 20, 2022 at 9:38
  • E.g. simply using some settings like i.stack.imgur.com/akq99.png would already improve readability a lot Aug 20, 2022 at 10:09
  • @samcarter_is_at_topanswers.xyz that is the idea..
    – georg
    Aug 20, 2022 at 18:05
  • that is not what i want to do. i specifically want to blur. why you misinterpret what i want to do as the main goal is beyond me. Just because you don't know how to achieve that. So why say anything? And instead you choose to focus on some subgoal I had.
    – georg
    Aug 20, 2022 at 18:05
  • 2
    Good luck with the blur! Aug 20, 2022 at 18:18

1 Answer 1

5

Pure latex approach:

\documentclass{beamer}

\usepackage[most]{tcolorbox}

\setbeamertemplate{background canvas}{%
  \begin{tikzpicture}[inner sep=0pt,remember picture,overlay]
    \node at (current page.center) {\includegraphics[height=\paperheight]{jwst}};
  \end{tikzpicture}
}

\usepackage{tikzpagenodes}

\def\myblur{4}

\makeatletter
\newtcolorbox{blur}[1][]{%
  #1,
  enhanced,
  remember,
  frame hidden,
  interior hidden,
  fonttitle=\bfseries, 
  coltitle=black,
  underlay={
    \begin{tcbclipframe}
      \begin{scope}[remember picture,overlay,inner sep=0pt]
        \fill[white] (current page.south west) rectangle (current page.north east);
        \foreach \x in {-10,-7.5,...,10}{
        \foreach \y in {-10,-7.5,...,10}{
          \node[opacity=0.01] at ([yshift=\y,xshift=\x]current page.center) {\includegraphics[height=\paperheight]{jwst}};
        }}
      \end{scope}
    \end{tcbclipframe}
   }
}
\makeatother


\begin{document}
    
\begin{frame}
  \begin{blur}[
    title={My title},
  ]
  some test
  \end{blur}
\end{frame} 

\end{document}

enter image description here

(example image taken from https://webbtelescope.org/contents/news-releases/2022/news-2022-031)

If you already have a blurred version of the background:

\documentclass{beamer}

\usepackage[most]{tcolorbox}

\setbeamertemplate{background canvas}{%
  \begin{tikzpicture}[inner sep=0pt,remember picture,overlay]
    \node at (current page.center) {\includegraphics[height=\paperheight]{jwst}};
  \end{tikzpicture}
}

\usepackage{tikzpagenodes}

\def\myblur{4}

\makeatletter
\newtcolorbox{blur}[1][]{%
  #1,
  enhanced,
  remember,
  frame hidden,
  interior hidden,
  fonttitle=\bfseries, 
  coltitle=black,
  underlay={
    \begin{tcbclipframe}
      \begin{scope}[inner sep=0pt,remember picture,overlay]
        \fill[white] (current page.south west) rectangle (current page.north east);
        \node[opacity=0.9] at (current page.center) {\includegraphics[height=\paperheight]{blured}};
      \end{scope}
    \end{tcbclipframe}
   }
}
\makeatother


\begin{document}
    
\begin{frame}
  \begin{blur}[
    title={My title},
  ]
  some test
  \end{blur}
\end{frame} 

\end{document}

enter image description here

5
  • I like this solution, but can it be invoked automatically with beamer's \begin{block}\end{block}? I use org mode which has a short-hand invocation of block environment, which preserves eg multiple columns. And more importantly, it preserves the itemize environment (you can see me use bullet blocks in my picture's example). So that is convenient as a no brain way to make slides
    – georg
    Aug 22, 2022 at 0:14
  • 2
    @georg You can redefine the block \setbeamertemplate{block begin}{\begin{blur}[title={\insertblocktitle}]} \setbeamertemplate{block end}{\end{blur}} Aug 22, 2022 at 11:06
  • thank you. i noticed your answers before and i think you do the highest level's work
    – georg
    Aug 23, 2022 at 0:26
  • is there a way to eliminate the white border coming through at the edges? It looks aliased or rough
    – georg
    Aug 23, 2022 at 18:11
  • That's probably a viewer issue. Aug 23, 2022 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .