# How do I prevent a text block image from overlapping title?

Like so many others before me, I am attempting to recreate my institute's PowerPoint theme in beamer. On our title slide, we have an image flush right and the title contents is to the left and right aligned. Searching, I found this answer on how to add the image itself to the slide; however, this causes the image to overlap the text (as is well known). I attempted to place the text in another text block, but I could not get the margins of the text block to mimic those of the default frame. I also tried placing the text in a tikz node, but that did not work either. I then went looking for how to adjust the margins on a single frame but couldn't find a method that worked.

Ultimately, I fiddled with a columns environment and got something to work. For example:

\documentclass{beamer}

\usepackage{mwe}
\usepackage[overlay,absolute]{textpos}

\title{Super Awesome Presentation with a Really Long Title}
\subtitle{Because it is really cool}
\author{Me, Myself, and I}
\institute{Distinguished Institute,\par%
Prestigious, Locale, 12345}
\date{\today}

\makeatletter
\defbeamertemplate*{title page}{custom}[1][]
{%
\newlength{\imwidth}
\setlength{\imwidth}{50mm}

\newlength{\offset}
\setlength{\offset}{\dimexpr\paperwidth-\imwidth}

\begin{textblock*}{\imwidth}(\offset, 0mm)
\includegraphics[width=\imwidth,height=\paperheight]{example-image}
\end{textblock*}

\begin{columns}
\begin{column}{\dimexpr\offset-\beamer@rightmargin}
\vfill
\inserttitle\par
\insertsubtitle\par
\bigskip
\insertauthor\par
\insertinstitute\par
\bigskip
\insertdate\par
\end{column}
\begin{column}{\imwidth}
\end{column}
\end{columns}
}
\makeatother

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


While this works, this doesn't strike me as the cleanest way to do this. So, my question is: How can I absolutely position an image on a beamer slide and have the remaining space respect the default beamer formatting?

# TikZ

Using the remember picture, overlay options of a tikzpicture you can position the image relative to the page without affecting the other content:

\documentclass{beamer}

\usepackage{tikz}

\title{Super Awesome Presentation with a Really Long Title}
\subtitle{Because it is really cool}
\author{Me, Myself, and I}
\institute{Distinguished Institute,\par%
Prestigious, Locale, 12345}
\date{\today}

\makeatletter
\defbeamertemplate*{title page}{custom}[1][]
{%
\begin{tikzpicture}[remember picture, overlay]
\node[xshift=-.25\paperwidth] at (current page.east) {\includegraphics[width=.5\paperwidth,height=\paperheight]{example-image-duck}};
\end{tikzpicture}

\begin{columns}[onlytextwidth]
\begin{column}{.5\textwidth}
\vfill
\inserttitle\par
\insertsubtitle\par
\bigskip
\insertauthor\par
\insertinstitute\par
\bigskip
\insertdate\par
\end{column}
\begin{column}{.5\textwidth}
\end{column}
\end{columns}
}
\makeatother

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


# Picture mode

Another way could be to use picture mode:

\documentclass{beamer}

\title{Super Awesome Presentation with a Really Long Title}
\subtitle{Because it is really cool}
\author{Me, Myself, and I}
\institute{Distinguished Institute,\par%
Prestigious, Locale, 12345}
\date{\today}

\makeatletter
\defbeamertemplate*{title page}{custom}[1][]
{%
\setlength{\unitlength}{1mm}
% xpos: 128/2-10
% ypos:
\begin{picture}(0,0)(-54,72.5)
\put(0,0){\includegraphics[width=.5\paperwidth,height=\paperheight]{example-image-duck}}
\end{picture}

\begin{columns}[onlytextwidth]
\begin{column}{.5\textwidth}
\vfill
\inserttitle\par
\insertsubtitle\par
\bigskip
\insertauthor\par
\insertinstitute\par
\bigskip
\insertdate\par
\end{column}
\begin{column}{.5\textwidth}
\end{column}
\end{columns}
}
\makeatother

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


• Good to see that tikz can handle the task too. However, I see that this still relies on columns to restrict the remaining area which is what I already do. Do you have any thoughts on how to reduce the area for the title without using columns? – Keith Prussing Aug 15 '18 at 18:21
• @KeithPrussing You could use a minipage instead. – user36296 Aug 15 '18 at 19:13

Based on this question and answer, which mentions using geometry, one can adjust only the right margin on a single slide using \newgeometry. In short, simply set the right margin to the image width plus the default beamer width. This preserves the other margins on the page and the margins on the rest of the slides without needing a columns or minipage environment.

A working example is:

\documentclass{beamer}

\usepackage{mwe}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage[overlay,absolute]{textpos}

\title{Super Awesome Presentation with a Really Long Title}
\subtitle{Because it is really cool}
\author{Me, Myself, and I}
\institute{Distinguished Institute,\par%
Prestigious, Locale, 12345}
\date{\today}

\makeatletter
\defbeamertemplate*{title page}{custom}[1][]
{%
\newlength{\imwidth}
\setlength{\imwidth}{50mm}

\newlength{\offset}
\setlength{\offset}{\dimexpr\paperwidth-\imwidth}

\newgeometry{right=\dimexpr\imwidth+\beamer@rightmargin}

\begin{textblock*}{\imwidth}(\offset, 0mm)
\includegraphics[width=\imwidth,height=\paperheight]{example-image}
\end{textblock*}
\vfill
\inserttitle\par
\insertsubtitle\par
\bigskip
\insertauthor\par
\insertinstitute\par
\bigskip
\insertdate\par
}
\makeatother

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

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

• You don't need \usepackage{geometry} - beamer already loads it – user36296 Aug 15 '18 at 22:48