Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to make a .sty template, but I cannot figure out how to define a dedicated background canvas for the "part page" frames.

Here (How to add background only to title frame and an other only to the last frame?) is a solution for when it is possible to characterize the background depending on the frame number, but it cannot be applied in my situation.

So is there a way to test the "type" of frame? (like "title page", "part page", ...). If yes, it means I can do the same as the solution to sandoche's problem. If not, can anybody think of a workaround?

share|improve this question
add comment

1 Answer

As far as I know, the background canvas is drawn before the actual contents of the frame are read. So in \frame{\partpage}, the background is drawn before beamer sees the \partpage and can realize that the frame is a part page.

If you want a \frame{\partpage} immediately after every \part{}, then you can simply hook into \AtBeginPart:

\documentclass{beamer}

\AtBeginPart{%
    {%  start a group to keep the template change local
        \setbeamertemplate{background canvas}{%
            \color{red!50}\rule{\paperwidth}{\paperheight}%
        }%
        \frame{\partpage}%
    }%  end group
}

\begin{document}
\part{The first part}
\frame{...}
\frame{...}
\part{The second part}
\frame{...}
\frame{...}
\end{document}

result

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.