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

When using \hspace and \vspace, I often run into a decision of which units to use. In many examples I see the use of ex, cm, mm, pt, in, and so on. I also use .1\textwidth or .1\textheight. I wonder if there is a standard unit that makes sense for moving boxes or figures in beamer; I am recently consolidating all of my vertical space units to ex but is this sensible? Is there an equivalent horizontal space unit which corresponds to character width (for a monospace font), for instance?

share|improve this question
You can use em for horizontal space. See this for more info: tex.stackexchange.com/questions/8260/… ,especially Herbert's last answer and this one tex.stackexchange.com/questions/4239/… – percusse Sep 30 '12 at 12:32
Some units change depending on the type size. For example, if your \documentclass has a 10pt (11pt) option then 1em will be equal to 10pt (11pt). Some lengths are better expressed relative to the type size, in which case you should use em or ex. Other units are better expressed in absolute units such as cm, m, and even inch. – Marc van Dongen Sep 30 '12 at 12:43
up vote 5 down vote accepted

It depends why you are moving things.

.1\textwidth is a fraction of the page size so changes if you change page size (which is perhaps less likely in beamer than in a journal article class). 5pt is a fixed unit (at some notional size which may not relate to any actual size by the time you have projected your presentation, so it is more or less used the same way as a fraction of \textwidth for positioning things relative to the page in fixed units. cm, in etc are just (in TeX) defined as fixed multiples of pt so they are just for human convenience. If you find cm more convenient than pt use it if not, don't.

ex and em are font related sizes so don't use them for positioning on page as the position will change depending on the font. Use them for things like indents (or defining the size of inter-word-space) or inter-paragraph space where the size determination relates to the content rather than the area into which the content is being typeset.

Traditionally em is used for horizontal units (its name derives from the width of an M) and ex is used for vertical units (its name derives from the height of an x).

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.