Beamer Block 高斯模糊?

Beamer Block 高斯模糊?

目前,我有我的 beamer 主题,因此块环境是透明的。是否也可以让它们进行高斯模糊(显然会模糊背景以产生令人讨厌的 Windows 7 效果)?我认为人们已经找到了让 tikz 这样做的方法,但是作为默认设置(对于每个块环境)呢?

目前我有这样的效果: beamer 块环境

为什么我要使用高斯模糊?这样我的幻灯片中就可以有更多烦人的背景,模糊会让警报环境中的文本在很多情况下变得可读

  • 以终端模糊为例。它是透明的,但无论桌面上发生什么,你仍然可以阅读文本

在此处输入图片描述

答案1

纯乳胶方法:

\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}

在此处输入图片描述

(示例图片取自https://webbtelescope.org/contents/news-releases/2022/news-2022-031

如果您已经有了背景的模糊版本:

\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}

在此处输入图片描述

相关内容