I'm using the following script in beamer to locate our logo at the right-most corner of all pages in the presentation,

\begin{textblock}{5}(10.0, \dimexpr 0.5\headheight - 7.5pt )

The placement of the textblock in the page is fine, however there is an undesired equal sign (see added image) in the page. It's the first time I use \dimexpr, do I make a mistake?

enter image description here

I think this undesired equal sign comes from \dimexpr 0.5\headheight - 7.5pt this part of script. Because when I replace it with, for example, 1, the equal sign goes.

I just tried to do something \dimexpr 15pt - 7.5pt it still gives an undesired equal sign.

  • 1
    Please, convert it to a full Minimal (non-)Working Example. – yo' Nov 20 '12 at 8:48
  • 1
    You probably also get some compilation errors: never overlook them. – egreg Nov 20 '12 at 9:18
  • @egreg Yes, I have some compilation errors too. However, my deadline is coming and I pretend like there no warnings. I really wish I had time to create a perfect template. – Sait Nov 20 '12 at 9:21
  • Error messages and warnings are different things; an error can lead to very unexpected results, as you found out. – egreg Nov 20 '12 at 9:23

Another option is to use the starred version of the textblock environment. This way, you can indicate the unit and, when the calc package is loaded, you can do your usual calc computations.

\title{Topic name}
\author{My name}
\begin{textblock*}{5cm}(10pt,\dimexpr0.5\headheight - 7.5pt)

I suppose that testblock doesn't accept values with a unit. You have to strip it:

\PassOptionsToPackage{demo}{graphicx}%% only for demo

\def\foo{\strip@pt\dimexpr0.5\headheight - 5pt\relax}


However, instead of using textblock you should redefine your header which is possible with the default macros which beamer provides.

  • This manipulation generates an undesired @pt 0.5= – Sait Nov 20 '12 at 9:15

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.