< TeX

Synopsis

\ifinner <TeX code 1> [\else <TeX code 2>] \fi

Description

The \ifinner command denotes the start of an if-then-else control structure that tests whether TeX is currently in either internal vertical mode or restricted horizontal mode or math mode. As indicated in the Synopsis, the \else part is optional. <TeX code 1> is processed if TeX is in one of the afore-mentioned modes, otherwise it is ignored. If the \else section is included and TeX is either in vertical mode or horizontal mode or display math mode then <TeX code 2> is processed; otherwise it is ignored.

Examples

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.