Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to add an image to my footline and aligned with the text of the same footline.

I have the following in my beamertheme.

\def\logo{%
\resizebox{!}{2.5ex}{\includegraphics{logo-small.png}}
}

\mode<presentation>
\defbeamertemplate*{footline}{example theme}
{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,%
        leftskip=.3cm,rightskip=.3cm plus1fil]{separation line}
        \usebeamerfont{section in head/foot}%
        \insertshortauthor\hfill\insertshorttitle\hfill\logo
    \end{beamercolorbox}
}
\mode
share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  lockstep Oct 9 '11 at 14:25
    
Well, what kind of alignment do you want exactly? You can modify the image height using \raisebox{<amount>}{<content>}. Please always add a complete but minimal working example (MWE). Thanks. –  Martin Scharrer Oct 9 '11 at 14:28
    
Thanks! That worked :D –  Jose Monreal Oct 9 '11 at 15:38
    
@MartinScharrer: Since your suggestion solved the issue, perhaps you should post that as an answer so this can be marked as answered. –  Peter Grill Oct 10 '11 at 22:02
    
@PeterGrill: Done –  Martin Scharrer Oct 10 '11 at 23:53
add comment

1 Answer

You can modify the image height using \raisebox{<amount>}{<content>}. The \resizebox{!}{2.5ex}{...} is actually not required, you can use the width key of \includegraphics macro for the resizing:

\def\logo{%
  \raisebox{<amount>}{\includegraphics[width=2.5ex]{logo-small.png}}%
}

You could also load the adjustbox package with the export option, then you can use the raise key with \includegraphics:

\def\logo{%
  \includegraphics[width=2.5ex,raise=<amount>]{logo-small.png}%
}
share|improve this answer
    
You could also load the adjustbox package with the export option – cool, didn't know about that and just figured that there is a new version of adjustbox available. Very useful! –  Daniel Oct 11 '11 at 7:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.