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.)


\setbeamercolor*{frametitle in title}{fg=red, bg=black}

        \begin{beamercolorbox}[wd=\paperwidth, dp=1ex, ht=4.5ex, sep=1ex, colsep*=0pt]{frametitle in title}%


Everythings fine here

\frametitle{Can you see?} 


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.

  • Is this a question? May I suggest you delete this question and ask again for specific help with \raisebox? – Will Robertson Dec 1 '10 at 7:09
  • I tidied up your question a bit, hope that's OK. – Hendrik Vogt Dec 1 '10 at 8:57

You are quite right, the problem comes from the descender of the "y" in "Can you see". (It's quite natural that you were puzzled and first thought fragile to be the culprit; I had a related question where I also didn't know what's happening. Juan A. Navarro called it "the dreadful Beamer's vertical alignment problem" ...)

Solution: Add a \strut to your frame titles, like this:

\frametitle{Can you see?\strut}

Then you see that the picture isn't shifted anymore. Now the picture is too high, but this can easily be solved by adapting the \raisebox{-1.75ex} of the picture.

  • Hi thanks so much... Now i use the following code (if s.o. has a related prob) \usebeamerfont{frametitle} \insertframetitle\strut \hfill \raisebox{-2ex}[0pt][-\ht\strutbox ]{ \insertmylogo} – bloodworks Dec 1 '10 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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