3

How can I place a background image in beamer at a certain distance from the top and right page margin?

So far I only managed to control the horizontal position:

\documentclass{beamer}
\usepackage{lipsum}

\begin{document}
{   
\setbeamertemplate{background}{
  \vspace{1in}
  \hspace{1in}
  \Huge DRAFT
}
\frame{\lipsum[1]}
}
\end{document}

screenshot

Ideally, the distance should be specified from the top and right corner.

3 Answers 3

5

Put a rule of 1in height and 0in width and another with 1in width and 0in height.

\documentclass{beamer}
\usepackage{lipsum}

\begin{document}
\setbeamertemplate{background}{%
  \rule{0in}{1in}%
  \rule{1in}{0in}%
  \Huge DRAFT
  }
\frame{\lipsum[1]}
\end{document}

enter image description here

There is always a possibility of using tikz to put things on a page byt here only light weight things are considered.

One sample with adjustbox package

\documentclass{beamer}
\usepackage{lipsum}
\usepackage{adjustbox}

\begin{document}
\setbeamertemplate{background}{
  \begin{adjustbox}{raise=-1in,right=2in}
  \Huge DRAFT
  \end{adjustbox}
  }
\frame{\lipsum[1]}
\end{document}
3
  • Would it be possible to replace \hspace with something that counts the distance from the right? I tried right alignment, didn't work.
    – Desik
    Commented May 10, 2015 at 10:34
  • @DenisBogdanas Yes. Use \rule{1in}{0in}% instead of hspace. See the edit. Those % at the end are needed to prevent spurious spaces.
    – user11232
    Commented May 10, 2015 at 10:46
  • Thank you, I managed to count the distance from the right with right=\paperwidth-0.1in
    – Desik
    Commented May 10, 2015 at 11:07
4

Inside a picture environment, you can place things a arbitrary positions using \put

\documentclass{beamer}
\usepackage{lipsum}

\begin{document}

{   
    \setbeamertemplate{background}{
        \begin{picture}(254,190.5)(0,0)%
            \put(42,72){% Adjust these coordinates
                \Huge DRAFT%
            }%
        \end{picture}
    }

    \frame{\lipsum[1]}

}

\end{document}

enter image description here

2

This is also possible using background package, according to this answer:

\documentclass{beamer}
\usepackage{lipsum}

\usepackage{background}
\backgroundsetup{
        placement=top,
        position={\paperwidth-0.7in,-0.2in},
        scale=1,
        opacity=1,
        contents={\Huge DRAFT},    
}
\setbeamertemplate{background}{\BgMaterial}

\begin{document}
\frame{\lipsum[1]}
\end{document}

screenshot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .