# How can I fade out the margins of a Beamer frame?

I'm making a poster with beamer. The department's printer has a specific printable area that I must stay within, but I'd like to have a gradual fade-out of my background pattern.

How can I fade out to pure white by the time I hit this printable area? (Let's assume a .5in long-edge margin and a 1in short-edge margin, portrait orientation.)

### MWE

\documentclass{beamer}
\usetheme{Rochester}

\beamertemplategridbackground[.05in]

\begin{document}
\begin{frame}
\frametitle{MWE}
\begin{block}{Title}
Test
\end{block}
\end{frame}
\end{document}


### Doodle

-

I noticed you wanted this for a beamer poster rather than a beamer frame after I had found a solution, but I'll submit this anyway.

Instead of fading the background to white, I drew white rectangles on each edge and faded those to transparent. These are used as the background template, therefore sit behind the title bar on every frame. The lengths are flexible, so should be easily adaptable to a portrait layout. You probably need to build the document twice to get the correct positioning.

\documentclass{beamer}
\usetheme{Rochester}
\usepackage{tikz}

%\beamertemplategridbackground[.05in]
\newlength{\mylongedgemargin}
\setlength{\mylongedgemargin}{1in}

\newlength{\myshortedgemargin}
\setlength{\myshortedgemargin}{2in}

\usebackgroundtemplate{%
\begin{tikzpicture}[remember picture,overlay]
\draw[step=.05in,gray,very thin] (current page.south west) grid (current page.north east);
\fill [white,path fading=east] (current page.south west) rectangle ++(\mylongedgemargin,\paperheight);
\fill [white,path fading=west] (current page.south east) rectangle ++(-\mylongedgemargin,\paperheight);
\fill [white,path fading=north] (current page.south west) rectangle ++(\paperwidth,\myshortedgemargin);
\end{tikzpicture}
}

\begin{document}
\begin{frame}
\frametitle{MWE}
\begin{block}{Title}
Frame 1
\end{block}
\end{frame}
\end{document}


Edit: with beamerposter

\documentclass{beamer}
\usepackage[orientation=portrait,size=a4]{beamerposter}
\usetheme{Rochester}
\usepackage{tikz}

\newlength{\mylongedgemargin}
\setlength{\mylongedgemargin}{1in}

\newlength{\myshortedgemargin}
\setlength{\myshortedgemargin}{2in}

\usebackgroundtemplate{%
\begin{tikzpicture}[remember picture,overlay]
\draw[step=.05in,gray,very thin] (current page.south west) grid (current page.north east);
\fill [white,path fading=east] (current page.south west) rectangle ++(\mylongedgemargin,\paperheight);
\fill [white,path fading=west] (current page.south east) rectangle ++(-\mylongedgemargin,\paperheight);
\fill [white,path fading=north] (current page.south west) rectangle ++(\paperwidth,\myshortedgemargin);
\end{tikzpicture}
}

\begin{document}
\begin{frame}
\frametitle{MWE}
\begin{block}{Title}
Test
\end{block}
\end{frame}
\end{document}

-
Thanks :) unfortunately this doesn't seem to work with beamerposter (perhaps a necessary part of the MWE?) I know you mentioned in this post, but just so others know :) – Sean Allred Apr 30 '14 at 21:33
It seems to work for me. Try the beamerposter MWE I added. – erik Apr 30 '14 at 21:48
Ah, yes—I had left in the \beamertemplategridbackground, which doesn't work with this solution. Making the grid this way is perfectly fine :). Is there any way you can make it fade on top as well? (Use \setbeamercolor*{frametitle}{bg=} to remove that titlebar.) I tried adding \fill [white,path fading=south] (current page.south west) rectangle ++(\paperwidth,-\myshortedgemargin); to the picture, but to no effect. – Sean Allred May 1 '14 at 1:21
Aha! If you change current page.south west to current page.north west (duh) in the line I gave above, you get the correct result. Thanks! – Sean Allred May 1 '14 at 1:46