# beamer headline logo no vertical gap

We are trying to insert a logo on top of beamer slides

It's working with e.g. this template for headline:

\defbeamertemplate*{headline}{lifbody}
{
\hskip.9\paperwidth
\includegraphics[scale=0.5]{logo_lif}
}


The problem with this is that the whole slide will be shifted from the height of the logo.

We would like to have the slide with normal vertical position, with only the new logo on top of it.

We tried another way by putting a negative vspace after the logo, like this:

\defbeamertemplate*{headline}{lifbody}
{
\begin{flushright}
\includegraphics[scale=0.5]{logo_lif}
\end{flushright}
\vspace*{-2cm}
}


The problem with this is that only a part of the logo is visible because it's on background and the title of the frame is above it.

Is there a way to have the logo in foreground or any other method to have the same title vertical alignment with a logo in the headline?

• Please consider to add a full but minimal working example (MWE) that illustrates your problem. Things depend quite a bit on the loaded packages and the beamer theme etc.. May 18, 2011 at 16:08

To remove the vertical size of the logo use \raisebox{-\height}[0pt][0pt]{\includegraphics[<options>]{<filename>}} The -\height also pushes it downwards from the headline. You can also place this code in a \rlap{..} to also remove the horizontal size.
However, this will not solve your other issue with the title overlapping the logo. In this case I would place the logo somewhere else instead. Also you can use the textpos package or the overlay option of tikz to place the logo on an absolute place of the slide, as shown in How can I position an image in an arbitrary position in beamer?. This must then be done after the title is placed, in the footer maybe, so that it is in the foreground.