[Tex/LaTex] Do all starred commands have anything in common

environmentsmacrosstarred-version

\section* produces an unnumbered section, align* makes the environment unnumbered, which is comparable in a way. \newcommand* doesn't accept \par in its argument, which is different.

Stefan Kottwitz wrote:

Commonly, a star symbol * means a version of a command that behaves differently from the original. That often means suppressing numbering but could also refer to special features.

This might answer my question, but perhaps there's more to say (and it's nice to have it as a separate question).

Is there anything all starred commands have in common? Why would one define a starred command as opposed to another, differently named command indicating their semantic difference in the names? It seems that their definitions are usually entirely independent from each other.

Further reading:

Best Answer

Why do we give commands names? To indicate, ideally as clearly as possible, what it is that they do.

If you have two things that do very similar things, it makes sense to give them very similar names. On the other hand, if they do one thing significantly differently, you would like to be able to easily tell the two names apart, despite those names being similar. As an asterisk is a non-alphabetical character, and fairly dense, it stands out. It is therefore a reasonable way to modify the name of one command, to obtain a similar but easily distinguished command name.

But no, there isn't anything which all starred variants have in common. The command \section*, the amsthm command \newtheorem*, and the amsmath environment align* are un-numbered variants of their un-starred cousins. However:

  • \newcommand* creates a macro which will not accept carriage returns in any of its arguments.
  • \vspace* adds vertical space which will not be suppressed at the beginning or end of a page.
  • \\* creates a new line which will not cause a page break.
  • \tag* (in amsmath) allows you to add a visual label, comment, or other number-replacement for an equation, without the usual parentheses.

There is a bit of a theme of negation here, but it's not clear that these negations are of anything in common (aside, trivially, from "default" behaviours).