TransWikia.com

beamer > beamercolorbox > Text with Shadow or Glow

TeX - LaTeX Asked on June 19, 2021

  • This is a "fun" project.
  • I want to create a beamer presentation with a fancy title frame.
  • The goal is to have a black title frame with "bight colorful" text on it that looks like neon text (glowing).
  • It’s a bit inspired by the intro of the TV show "Stranger Things".
  • Ideally, I want to stick to beamer’s beamercolorbox approach to build the title frame template.
  • I found some (partly older) related questions but I was hoping that by now there is a simple solution available. There seems to be solutions available to generate this effect for boxes but not for text.
  • Question: Any idea how to generate a "neon glow" for normal text on the title frame with tikz and friends?

documentclass{beamer}

usepackage{tikz}
% Potentially Useful Libraries
usetikzlibrary{
    shadows.blur, % "pgf-blur" package
    }

% Title of Presentation
title{Presentation Title}

% Definition of Title Frame
setbeamertemplate{title page}
    {
    begin{beamercolorbox}[center]{title}
        usebeamerfont{title}inserttitle
    end{beamercolorbox}
    }

% Definition of Font Color of Title (Used in "setbeamertemplate{title page}")    
setbeamercolor{title}{fg=pink} 

% Related
% https://tex.stackexchange.com/questions/315989
% https://tex.stackexchange.com/questions/401032
% https://tex.stackexchange.com/questions/493401
% https://tex.stackexchange.com/questions/315989
% https://tex.stackexchange.com/questions/446841

begin{document}

% Title Frame
setbeamercolor{background canvas}{bg=black}
begin{frame}
maketitle
end{frame}
setbeamercolor{background canvas}{bg=}

% Normal Frame
begin{frame}{Frame Title}
Text
end{frame}

end{document}

enter image description here
enter image description here

Related

One Answer

This is not a complete answer but a simple trick to get something that resembles the neon text. One can use the contour package and superimpose several contours of different widths and low opacities to get such an effect. As pointed out here, transparency groups are important when combining contour with nontrivial opacities.

documentclass[tikz,border=3mm]{standalone}
usepackage{contour}
begin{document}
begin{tikzpicture}
fill (-1,-1) rectangle (1,1);
 foreach xyz in {0.05,0.1,...,1.5}
 {begin{scope}[transparency group,opacity=.05]
 contourlength{xyz pt}
 path[font=Huge]
 node{contour{red}{Test}};
 end{scope}};
end{tikzpicture}
end{document}

enter image description here

Some quick and simpleminded implementation in beamer (i.e. there are almost certainly better ways).

documentclass{beamer}

usepackage{tikz}
usepackage{contour}
title{Presentation Title}

% Definition of Title Frame
setbeamertemplate{title page}
    {
    begin{beamercolorbox}[center]{title}
    begin{tikzpicture}
fill (-1,-1) rectangle (1,1);
 foreach xyz in {0.05,0.1,...,1.5}
 {begin{scope}[transparency group,opacity=.05]
 contourlength{xyz pt}
 path
 node{contour{red}{usebeamerfont{title}Hugeinserttitle}};
 end{scope}};
end{tikzpicture}
    end{beamercolorbox}
    }

% Definition of Font Color of Title (Used in "setbeamertemplate{title page}")    
setbeamercolor{title}{fg=black} 


begin{document}

% Title Frame
setbeamercolor{background canvas}{bg=black}
begin{frame}
maketitle
end{frame}
setbeamercolor{background canvas}{bg=}

% Normal Frame
begin{frame}{Frame Title}
Text
end{frame}

end{document}

enter image description here

Correct answer by user237299 on June 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP