2

I used the following to get a checked background in a latex document (taken from Making a checkered background for a page) :

\documentclass{article}
\usepackage{background}
\usepackage{lipsum}

\newlength\mylen
\setlength\mylen{\dimexpr\paperwidth/150\relax}

\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{blue!15}
\SetBgContents{\tikz{\draw[step=\mylen] 
(-.5\paperwidth,-.5\paperheight) grid 
(.5\paperwidth,.5\paperheight);}}

\begin{document}
\lipsum[1-20]
\end{document}

And I got a nice background that I wanted. Now I want the same kind of background in my beamer presentation as well. For that I added the following in the preamble:

\usepackage{background}

\newlength\mylen
\setlength\mylen{\dimexpr\paperwidth/150\relax}

\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{blue!15}
\SetBgContents{\tikz{\draw[step=\mylen] 
(-.5\paperwidth,-.5\paperheight) grid 
(.5\paperwidth,.5\paperheight);}}

However, it is is not making any difference to the background, i.e., the same plain background is coming up. How can I have a checkered background on all the slides of my presentation?

annie
  • 23

1 Answers1

4

enter image description here

\documentclass{beamer}

\setbeamertemplate{background}[grid]
\begin{document}

\begin{frame}
    abc
\end{frame} 

\end{document}

To fine tune the grid, you can use \setbeamertemplate{background}[grid][step=<dimension>, color=<color>]

enter image description here

  • Definitely a +1 for the meme!! – Raaja_is_at_topanswers.xyz May 24 '17 at 13:04
  • Too good and simple a solution! Thank you. Just one doubt. I am fond of a grid with small squares. So I kept step=0.1cm. However, some of the lines of the grid are coming out to be thick and some are thin, as shown here: https://i.stack.imgur.com/yPdel.png – annie May 24 '17 at 13:38
  • @user328441 My guess would be the different line width are a viewer artefact. Try with another pdf viewer (i.e. adobe reader) or with another zoom level and see if this problem persists. – samcarter_is_at_topanswers.xyz May 24 '17 at 13:40