84

I know there are different ways of expressing sizes or dimensions in LaTeX such as points (pt), inches (in) and ex.

As some commands, such as \hspace understand all of them, I would like to have a reference or complete list of possible dimensions or sizes including a description of what they mean.

lockstep
  • 250,273
Henrik
  • 865

2 Answers2

97

From the plain TeX reference:

  • pt: Point
  • pc: pica (12 pt)
  • in: inch (72.27 pt)
  • bp: Big point (72 bp = 1 in)
  • cm: Centimeter
  • mm: Millimeter
  • dd: Didot point (1157 dd = 1238 pt)
  • cc: cicero (12 dd)
  • sp: Scaled point (65536 sp = 1 pt), the smallest TeX unit
  • ex: Nominal x-height
  • em: Nominal m-width

Available in math mode:

  • mu: math unit, 1 em = 18 mu, where em is taken from the math symbols family, various lengths are derived from it (thinspace, thickspace, etc.)

Additionally available in pdfTeX and LuaTeX:

  • px: "pixel", the dimension given to the \pdfpxdimen primitive; default value is 1 bp, corresponding to a pixel density of 72 dpi

See also here on TeX.SX:

The meanings of the various points are described here:

Stefan Kottwitz
  • 231,401
  • 1
    Thanks a lot. Could you expand a little on Didot points and the meaning of the nominal in ex and em? – Henrik Jan 17 '12 at 14:34
  • 13
    It is worth to note that "sp" is the smallest TeX unit and that it cannot be subdivided further. Thus any length in TeX is an integer multiple of "sp". – AlexG Jan 17 '12 at 14:39
  • em: It is M-width –  Jan 17 '12 at 14:39
  • 1
    pdftex and luatex have also the px unit, whose value can be changed on a per document basis (default 1px = 1bp). – egreg Jan 17 '12 at 14:41
  • Thanks especially for the link to the great question Which measurement units should one use in LaTeX? It is especially illuminating (and questioning the m-wdith theory). That is all I wanted and fast (i.e., I will accept). – Henrik Jan 17 '12 at 14:43
  • 3
    there's also the mu -- math unit (1 em = 18 mu, where em is taken from the math symbols family). this can be used only in math mode. – barbara beeton Jan 17 '12 at 14:49
  • I'm wondering why pt seems to be the default unit (see e.g. the TikZ package manual, chapter 13.2.1, where they explain that 2+3cm becomes 2pt+3cm), while it is almost the same as px and px should be the most native unit when compiling a document for on-screen view? – StrawberryFieldsForever Jun 12 '12 at 11:58
  • Wikipdia says 1 point = 1/72 inch, http://en.wikipedia.org/wiki/Point_%28typography%29. What is the difference and relation between point and big point? – Tim Nov 29 '14 at 14:12
  • Related: http://tex.stackexchange.com/questions/200934 – cgnieder Jul 26 '15 at 20:12
  • See https://en.wikipedia.org/wiki/Point_%28typography%29#American_points. Roughly, the difference between a pt and bp comes from the definition of a foot. Historically, there were 864 points in a foot, but after the foot grew by a tiny fraction as a result of its definition in terms of a meter, the historical point was no longer exactly 1/72 of an inch, but slightly smaller. (pt uses one particular definition of a "printer's foot", as described in the Wikipedia article.) A bp is a slightly larger point, used also in PostScript, which is again simply 1/72 of an inch. – chepner Jul 31 '15 at 20:02
  • TeX was never designed for on-screen documents; it was designed for resolution-independent documents, which could be rendered by various printing equipment. A point is a well-defined unit, while pixel varies from screen to screen and may not have a consistent shape. – chepner Jul 31 '15 at 20:05
51

I made visual overview for all units available in TeX. Including a comparison and the definitions/conversions.

previwe

The complete code and PDFs (EN, DE; b/w, color) are available at GitHub: https://github.com/tweh/tex-units

Tobi
  • 56,353