Complete guide to LaTeX measurement units, lengths, and spacing. Learn how to use points, ems, centimeters, and other units for precise document formatting.
Unit | Name | Equivalent | Best Used For |
---|---|---|---|
pt | Point | 1 pt = 1/72.27 inch | Font sizes, line widths |
pc | Pica | 1 pc = 12 pt | Typography measurements |
in | Inch | 1 in = 72.27 pt | Page dimensions |
cm | Centimeter | 1 cm = 28.45 pt | Metric page layout |
mm | Millimeter | 1 mm = 2.845 pt | Precise measurements |
bp | Big point | 1 bp = 1/72 inch | PostScript compatibility |
dd | Didot point | 1 dd = 1.07 pt | European typography |
cc | Cicero | 1 cc = 12 dd | European typography |
sp | Scaled point | 1 sp = 1/65536 pt | Internal calculations |
Unit | Name | Relative To | Best Used For |
---|---|---|---|
em | Em | Current font size | Font-dependent spacing |
ex | Ex | Height of letter ‘x’ | Vertical spacing |
en | En | Half the width of ‘M’ | Horizontal spacing |
mu | Math unit | 1/18 em in math mode | Math spacing |
em
for font-dependent spacing - Scales automatically with font changesex
for vertical spacing - Based on lowercase letter heightpt
for precise control - When exact measurements are neededcm/mm
for page layout - Intuitive for physical dimensionsCommand | Purpose | Example |
---|---|---|
\hspace{length} | Horizontal space | \hspace{2cm} |
\vspace{length} | Vertical space | \vspace{1ex} |
\setlength{\variable}{length} | Set length variable | \setlength{\parindent}{2em} |
\addtolength{\variable}{length} | Modify length | \addtolength{\textwidth}{-2cm} |
\newlength{\variable} | Create length variable | \newlength{\mywidth} |
Variable | Description |
---|---|
\textwidth | Width of text area |
\textheight | Height of text area |
\paperwidth | Paper width |
\paperheight | Paper height |
\baselineskip | Line spacing |
\parindent | Paragraph indentation |
\parskip | Space between paragraphs |