Jump to content

TeX/ifdim

From Wikibooks, open books for an open world
< TeX

Synopsis

[edit | edit source]
\ifdim <dimension-1><R><dimension-2> <tex-code-1> [\else <tex-code-2>] \fi

Description

[edit | edit source]

The \ifdim command denotes the start of an if-then-else control structure. The forms <dimension-1> and <dimension-2> must expand to dimensions, while <R> must be one of the characters '=', '<', or '>'. If <dimension-1><R><dimension-2> expands to a true expression then <tex-code-1> is processed; otherwise it is ignored. If the \else section is included and <dimension-1><R><dimension-2> expands to a false expression, then <tex-code-2> is processed; otherwise it is ignored.