See update below. The following problem occurred while I was trying to alter the frametitle in beamer. (Actually I want a picture in the Titlebar. I used a rule instead.)
\documentclass{beamer}
\usetheme{AnnArbor}
\setbeamercolor*{frametitle in title}{fg=red, bg=black}
\setbeamertemplate{frametitle}{%
\vspace{-0.165ex}
\mbox{%
\begin{beamercolorbox}[wd=\paperwidth, dp=1ex, ht=4.5ex, sep=1ex, colsep*=0pt]{frametitle in title}%
\usebeamerfont{frametitle}
\insertframetitle
\hfill
\raisebox{-1.75ex}[\ht\strutbox][-\ht\strutbox]{\rule{5ex}{5ex}}
\end{beamercolorbox}%
}%
}
\begin{document}
\begin{frame}
\frametitle{Hello}
Everythings fine here
\end{frame}
\begin{frame}%[fragile]
\frametitle{Can you see?}
DO
\end{frame}
\end{document}
So you can easily see that the red square representing the picture (I want it there) is shifted upwards on a fragile frame. I have no idea how fragile works (neither I have an idea about beamer but I was able to handle it so far.) Therefore I thought about an if-construct to figure out when fragil is on but... well there is no such construct available in user land...
thx for comments!
Update:
I just figured out, that the Problem has nothing to do with fragiles frames.
It comes from letters with descender. So in fact I'm struggling to use \raisebox correctly.
\raisebox? – Will Robertson Dec 01 '10 at 07:09