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 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.)

Related: How to add a gradient fade-out effect to an image?

MWE

\documentclass{beamer}
\usetheme{Rochester}

\beamertemplategridbackground[.05in]

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

Doodle

doodle

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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}
\usetikzlibrary{fadings}

%\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}

enter image description here

Edit: with beamerposter

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

\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}
share|improve this answer
    
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 at 21:33
    
It seems to work for me. Try the beamerposter MWE I added. –  erik Apr 30 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 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 at 1:46

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.