TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Please, convert it to a full Minimal (non-)Working Example. – yo' Nov 20 '12 at 8:48
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
up vote 3 down vote accepted

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)
share|improve this answer

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.

share|improve this answer
This manipulation generates an undesired @pt 0.5= – Sait Nov 20 '12 at 9:15

Your Answer


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.