[Tex/LaTex] Beamer: Right Frame Border

beamer

How can I draw an e.g. 10px broad orange border on the right hand side of each frame? And how can I draw it only on the titlepage?

It shoud look like that:
right frame border

Best Answer

You can use the beamer template background canvas and TikZ to do that:

\documentclass{beamer}
\author{diabonas}
\title{Frame border}
\usepackage{tikz}
\begin{document}
{ % only on titlepage
\setbeamertemplate{background canvas}{%
\begin{tikzpicture}
    \clip (0,0) rectangle (\paperwidth,\paperheight);
    \fill[color=orange] (\paperwidth-10pt,0) rectangle (\paperwidth,\paperheight);
\end{tikzpicture}}
\maketitle
} % only on titlepage
\frame{Content}
\end{document}

titlepage with right border

This keeps the frame border local to the titlepage. To have it on all frames, remove the two lines marked with % only on titlepage.

BTW: The unit px is only available in pdfTeX and LuaTeX - you can use pt instead which is the same as px in the default setting.

If you don't want to use TikZ, you can use the following background template (thanks to Gonzalo Medina):

\setbeamertemplate{background canvas}{%
    {\color{orange}\hspace*{\dimexpr\paperwidth-10pt\relax}\rule{10pt}{\paperheight}}%
}