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 want to superpose a text to some other object (in this aces a picture). My idea is to store the picture in \mabox, to display it with in a \makebox with 0 width and height, then to display the text thru a second \makebox, with width and height equal to those of \mabox. My attempt fails, because \wd\mabox delivers a length with unit, and \makebox expects a length without unit. How could i do it better?




share|improve this question
Would it be a solution to use TikZ? In that case, take a look at tex.stackexchange.com/questions/9559/… – ilpssun Mar 16 '12 at 9:36
up vote 6 down vote accepted

Don't tell anyone I told you, but you can go


Note that having made \unitlength unitless, you have to put explicit units in places that normally take an integer.

The alternative is to use \strip@pt defined in LaTeX eg this use where LaTeX is switching between unit and non-unit font size representation


but often it's easier just to use units everywhere in picture mode, then you are not restricted to using the same units throughout.

share|improve this answer
ok, i will not tell anyone ;) But the command \strip@pt makes exactly what i want : just put a \strip@pt before \wd\mabox and \ht\mabox in my second makebox. Thanks ! – nicolas roy Mar 16 '12 at 9:45

Use the picture package, so that


is accepted; you're allowed to put explicit and implicit (that is, expressed as register values) dimensions in all commands of the picture environment.

share|improve this answer

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.