As LaTeX processes your document, at any point it is in one of six modes. They fall into three categories of two each, the horizontal modes, the math modes, and the vertical modes. Some commands only work in one mode or another (in particular, many commands only work in one of the math modes), and error messages will refer to these.
LR mode (for left-to-right mode; in plain TeX this is called restricted horizontal mode) is in effect when LaTeX starts making a box with an \mbox
command. As in paragraph mode, LaTeX’s output is a string of words with spaces between them. Unlike in paragraph mode, in LR mode LaTeX never starts a new line, it just keeps going from left to right. (Although LaTeX will not complain that the LR box is too long, when it is finished and next tries to put that box into a line, it could very well complain that the finished LR box won’t fit there.)
Display math mode is when LaTeX is generating a displayed mathematical formula. (Displayed formulas differ somewhat from inline ones. One example is that the placement of the subscript on \int
differs in the two situations.)
Internal vertical mode is in effect when LaTeX starts making a \vbox
. This is the vertical analogue of LR mode.
For instance, if you begin a LaTeX article with ‘Let \( x \) be ...’ then these are the modes: first LaTeX starts every document in vertical mode, then it reads the ‘L’ and switches to paragraph mode, then the next switch happens at the ‘\(’ where LaTeX changes to math mode, and then when it leaves the formula it pops back to paragraph mode.
Paragraph mode has two subcases. If you use a \parbox
command or a minipage
then LaTeX is put into paragraph mode. But it will not put a page break here. Inside one of these boxes, called a parbox, LaTeX is in inner paragraph mode. Its more usual situation, where it can put page breaks, is outer paragraph mode (see Page breaking).
• \ensuremath | Ensure that math mode is active. |
© 2007–2018 Karl Berry
Public Domain Software
http://latexref.xyz/Modes.html