When you get an error in LaTeX, the message "Undefined control sequence" is printed. Why is it called "control sequence" and not "command", for example? How does the sequence work? Is this a TeX or LaTeX thing?
It says “control sequence” because that's the name Knuth chose. In his manual about LaTeX, Lamport decided instead to use “command”.
Since those low level error messages are hardwired in TeX, you cannot dispense with or modify them.
A control sequence can be
\<letters>, for instance
\abcand so on
\<nonletter>, for instance
<active character>, for instance
The description of what a control sequence is and how they are parsed from the text input can be found in TeX by Topic. (
texdoc texbytopic from a terminal or http://texdoc.net/texmf-dist/doc/plain/texbytopic/TeXbyTopic.pdf). However, you can safely refer to them as “commands”, if you prefer.
It would be possible to modify the error messages, by writing a change file for the WEB source of TeX and recompiling it
Control sequence is (typically, roughly speaking) a sequence of letters with preceded backslash. This is TeX terminology.
Control sequence has assigned its meaning. The meaning typically is:
- TeX primitive ... a command processed by TeX itself (for example
- macro ... a sequence declared by
\edefetc.). For example
\newcommandis a LaTeX macro declared by
\def. The expansion of
\newcommandmacro uses the
\defprimitive for declaring new control sequence as macro.
- register ... a variable saving some value (primitive register,
\baselineskipfor example, or register declared by
- character constant ... sequences declared by
\mathchardefprimitives, for example
- font selectors ... sequences declared by
Undefined control sequence is any control sequence which has no meaning assigned.
LaTeX documentation hide this terminology and simply mentions only "commands". And LaTeX users are confused when they read the TeX error messages. Of course, end users needn't to know that
\% is control sequence with the meaning of "character constant". It is sufficient to know that this is "command" which prints the percent character.
To add to the existing answers, "control sequence" has a specific meaning and evokes accurate imagery of a sequence of characters that have control semantics (rather than being printables).
The notion of "control characters" is nothing new (even at the time LaTeX came into being) so talking about "control sequences" makes complete sense.
On the other hand, the term "command" is exceedingly ambiguous. I for one am glad that Knuth made his choice as he did!
To add to existing answers, Knuth made a comment in his parody "An Earthshaking Announcement" talk, in TUG 2010 Conference indicating the peculiarity of this name:
Examples of my tunnel vision abound, on almost every page of The TEXbook. For example, I used backslashes and other strange characters to define what I called “control sequences”. Does any other system you know have control sequences? Of course not.