One line
A command is \name{arg}: it acts on the argument or the current point, then it is done. An environment is \begin{name} … \end{name}: everything between follows that name’s rules.
So \textbf{word} is a command. figure, equation, abstract, and tabular are environments. Mixing the two often errors far from the typo.
Side by side
The same look sometimes exists as both. Prefer the form that says what the block is, not the shorter spelling.
- \textbf{…}
- Command. Bold a few words.
- {\bfseries …}
- A declaration. Bold until the group ends. Rarely worth it.
- \begin{abstract}
- Environment. An abstract is a region, not a word.
- \begin{equation}
- Environment. A display that may be numbered.
- $…$
- Inline math as a command-like form, not an environment.
- \begin{figure}
- Environment. A float must have a matching end.
Pairs people mix in a venue draft
- tabular is an environment inside table; there is no \tabular{…} you want
- itemize / enumerate are environments; \item is the command
- align is an environment; \\ breaks a line inside it, it does not start a new align
- center adds vertical space; in a venue draft, fix the caption instead of wrapping center
- minipage is an environment for two side panels, not a \minipage command
What a mismatch looks like
A missing \end{figure} swallows the rest of the file; the error may print at the end. A name mismatch logs \begin{figure} ended by \end{table}.
Close the nearest environment first. Do not insert a new begin in the middle to “fix” it.
FAQ
- Is \[ … \] a command or an environment?
- It is shorthand for an unnumbered display, close to equation*, but you cannot \label it. Number and cite with equation.
- Why not \begin{textbf}?
- textbf is not an environment. Write \textbf{this phrase}. If a long block needs weight, it probably wants a subsection or a theorem, not bold.