# Customizing beamer using absolute coordinates

at the moment I try to build up a custom beamer template to match the ones used at my institute. While I find a lot of the concepts to be logical and easy to use, especially positioning is a pain and somewhat uncontrollable to me. So I would like to ask, if there is somewhere a complete overview of margins in beamer and a solution on how to get rid of them. Also I would like to ask if there is a good overview on how to position with tikz.

To illustrate my struggles, I would just give a short example: I setup the papersize and in the outertheme.sty I tried to define a background over the whole paper. Why is it somewhere on the slide, if I compile and not expanding from one corner to the other?

\begin{filecontents*}{beamerthemepositioning.sty}
\mode<presentation>

% Requirement
\RequirePackage{tikz}
\RequirePackage{xcolor}

% Settings
\useinnertheme{positioning}

\mode<all>
\end{filecontents*}

\begin{filecontents*}{beamerinnerthemepositioning.sty}
\mode<presentation>

\usetikzlibrary{backgrounds}

% Title page
\setbeamertemplate{title page}{%
\begin{tikzpicture}[remember picture,overlay]

% Background
\fill [red] (0mm,0mm) rectangle (250mm,190mm);
%Title
\node[anchor=north west]
at (10mm,90mm) (title)
{\parbox[t]{247mm}{\raggedleft%
\usebeamerfont{title}\textcolor{black}{\inserttitle}}};

\end{tikzpicture}
}

\mode
<all>
\end{filecontents*}

\documentclass[14pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ngerman}
\usepackage{tikz}
\RequirePackage{xcolor}
\usepackage[absolute,overlay]{textpos}
\title{Example Positioning disaster}

\geometry{papersize={250mm,190mm}}

\usetheme{positioning}

\begin{document}

\begin{frame}
\titlepage
\end{frame}
\end{document}


As an addition, I know the package textpos, which seems to allow the concept of giving absolute coordinates. But as far as I know it works only for text. Is there also a native solution in beamer/tikz for absolute positioning and defining origins on canvas/paper?

Thanks for your comments and suggestions on how to make progress with the template!

My personal opinion: Using tikz is a bit of overkill for simply positioning.

For my own beamer themes I used a simple picture environment and position the elements with \put(x,y){...}. To control the maximum width and linebreaks for the frametitle etc. I use minipages.

\documentclass[14pt]{beamer}
\geometry{papersize={250mm,190mm}}

% Title page
\setbeamertemplate{title page}{%
\setlength{\unitlength}{1mm}
\begin{picture}(250,190)(10,0)%
\put(0,0){\color{red}\rule{\paperwidth}{\paperheight}}
\put(72.0,100){%
\begin{minipage}[b][30.7mm][b]{169.3mm}
\usebeamerfont{title}{\inserttitle\par}
\end{minipage}
}
\end{picture}
}

\title{Example Positioning disaster}

\begin{document}

\begin{frame}
\titlepage
\end{frame}
\end{document}


Second solution

If you'd like to stay with tikz, you could define your coordinates with respect to the page, e.g. to fill the whole background:

\documentclass[14pt]{beamer}
\geometry{papersize={250mm,190mm}}

\usepackage{tikz}

\setbeamertemplate{title page}{%
\begin{tikzpicture}[overlay, remember picture]
\fill[red] (current page.south west) rectangle (current page.north east);
\end{tikzpicture}
}

\title{Example Positioning disaster}

\begin{document}

\begin{frame}
\titlepage
\end{frame}
\end{document}

• Thank you Sam, for the suggestion, but I was just wondering how the positioning can be done. For sure later more and more complex shapes shall be added to the template. This is the reason, why I wanted to use tikz and was surprised about the result even with such a simple shape. Oct 26 '17 at 15:37
• @Jäger please see my second answer Oct 26 '17 at 20:34