[Tex/LaTex] a “Control Sequence”

tex-core

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?

Best Answer

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 \a, \ab, \abc and so on

  • \<nonletter>, for instance \? or \.

  • <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