1

In this answer, @diabonas suggested a way to apply a fixed transition to every slide:

\addtobeamertemplate{background canvas}{\transfade}{}

Why, in this MWE, applying the extension as a pre-text (p.167 of the Beamer manual) results in the background canvas being shifted horizontally? Shifting the \transfade to the post-text magically fixes it.

\documentclass{beamer}
\usepackage{xcolor}
\usepackage{tikz}

\usetikzlibrary{backgrounds, positioning, scopes}

\makeatletter \definecolor{officialGradient1}{HTML}{223a33} \definecolor{officialGradient2}{HTML}{0a161f}

\mode<beamer>{ \defbeamertemplate{background canvas}{divoc shading} { \pgfuseshading{divoc shading}% simple enough } [action] { \pgfdeclareverticalshading{divoc shading}{\the\paperwidth} {color(0cm)=(officialGradient2); color(\the\paperheight)=(officialGradient1)} } \setbeamertemplate{background canvas}[divoc shading] } \mode<all>

\addtobeamertemplate{background canvas}{\transfade[duration=0.2]}{} \makeatother

\begin{document} \begin{frame} \frametitle{Test}

    Test.

\end{frame}

\end{document}

enter image description here

amyspark
  • 628

0 Answers0