TransWikia.com

canonical units for defining white space in a beamer presentation?

TeX - LaTeX Asked by hatmatrix on December 10, 2020

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 .1textwidth or .1textheight. 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?

One Answer

It depends why you are moving things.

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

Correct answer by David Carlisle on December 10, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP