How should this work when you define two columns each with a width of 0.5\textwidth
. You have to add the columnsep and all together is > \textwidth
, the reason why beamer shifts all to the left.
\documentclass{beamer}
\usetheme{Rochester}
\begin{document}
\begin{frame}[t]
\frametitle{...}
\begin{columns}[T]
\column{.425\textwidth}
\begin{block}{...}
...
\end{block}
\column{.425\textwidth}
...
\end{columns}
\noindent
\rule{\textwidth}{5pt}
\begin{columns}[T]
\column{.425\textwidth}
\begin{block}{...}
...
\end{block}
\column{.425\textwidth}
\begin{block}{...}
...
\end{block}
\end{columns}
\end{frame}
\end{document}
Look into the documentation for the value of the columnsep; then you can define it exactly to \textwidth
.
Question 1: You can use any of the fields given by \author
, \title
, \date
, or \institute
to place the image in the title page; if none of those fields allow you to achieve the desired placement, you can use the textpos
package. The example below uses the \author
field to add the image.
Question 2: With the help of the textpos
package you can add the logo to the frametitle
template using \addtobeamertemplate
.
A simple example code:
\documentclass{beamer}
\usetheme{Madrid}
\usecolortheme{beaver}
\usepackage{textpos}
\title{The title}
\author[The author]{\includegraphics[height=1cm,width=2cm]{cat}\\The Author}
\institute[Inst.]{The Institute}
\date{\today}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\addtobeamertemplate{frametitle}{}{%
\begin{textblock*}{100mm}(.85\textwidth,-1cm)
\includegraphics[height=1cm,width=2cm]{cat}
\end{textblock*}}
\begin{frame}{Motivation}
Now the logo is visible
\end{frame}
\end{document}
As osjerick mentions in a comment, the above solution won't behave correctly if \framesubtitle
is used (the image will shift downwards); in this case, a TikZ approach can be used to prevent the movement:
\documentclass{beamer}
\usetheme{Madrid}
\usecolortheme{beaver}
\usepackage{tikz}
\title{The title}
\author[The author]{\includegraphics[height=1cm,width=2cm]{cat}\\The Author}
\institute[Inst.]{The Institute}
\date{\today}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,yshift=2pt] at (current page.north east) {\includegraphics[height=0.8cm]{cat}};
\end{tikzpicture}}
\begin{frame}{Motivation}
Now the logo is visible
\end{frame}
\begin{frame}{Motivation}
\framesubtitle{A}
Now the logo is visible
\end{frame}
\end{document}
Best Answer
You can use
\setbeamersize
(see Section 8.3 Frame and Margin Sizes of thebeamer
manual):The default margins:
After setting the margins to
5pt
as in the example code: