TeX/ifhbox

From Wikibooks, open books for an open world
< TeX
Jump to navigation Jump to search

Synopsis[edit | edit source]

\ifhbox<0..255> <tex-code-1> [\else <tex-code-2>] \fi

Description[edit | edit source]

The \ifhbox command denotes the start of an if-then-else control structure, where <0..255> must expand to an integer from 0 to 255. If the box register \box<0..255> contains a hbox, then <tex-code-1> is processed and <tex-code-2> is ignored, if the \else section is included. If \box<0..255> does not contains a hbox then <tex-code-1> is ignored and <tex-code-2> is processed, if the \else section is included.