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.

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}
  • Would it be possible to replace \hspace with something that counts the distance from the right? I tried right alignment, didn't work. – Desik May 10 '15 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 May 10 '15 at 10:46
  • Thank you, I managed to count the distance from the right with right=\paperwidth-0.1in – Desik May 10 '15 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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