[Tex/LaTex] beamer: Difference between \setbeamertemplate{background canvas} and \usebackgroundtemplate (and \setbeamertemplate{background})

beamer

Question

When I want to change the background of a beamer presentation I used to use something like this:

\setbeamertemplate{background canvas}%
{%
    \includegraphics[width=\paperwidth, height=\paperheight]%
    {%
        Picture.jpg
    }%
}

which is also documented in the beamer documentation. In some answers here I often see

\usebackgroundtemplate{
    \includegraphics[width=\paperwidth,height=\paperheight]{Picture.jpg}
}
  1. Is there a best practice?
  2. Surprisingly I can't find \usebackgroundtemplate when searching in the beamer documentation.

Related

Best Answer

  • Concerning your questions what \usebackgroundtemplate does:

    It's defined in beamerbasecompatibility.sty as

    \def\usebackgroundtemplate{\setbeamertemplate{background canvas}}
    

    From the filename I would conclude, that commands defined for compatibility are not the ones to be used as "best practice" - but the result should be the same.

  • For the difference of \setbeamertemplate{background canvas} and \setbeamertemplate{background}:

    Basically these are two different layers, see How does beamer build the frame? for an overview.