See also:

What do newcommand, renewcommand, and providecommand do, and how do they differ?

We have

  • \newcommand: Acts when command undefined; error otherwise.
  • \renewcommand: Acts when command defined; error otherwise.
  • \providecommand: Acts when command undefined; no-error otherwise.

What about:

  • \???: Acts when command defined; no-error otherwise.
  • \???: Acts regardless of whether command is defined or not

Why aren't these available to use by default?

  • 2
    latex2e is the size it is because of the size of the hash table in emtex. if you loaded article class and amsmath you had about 50 commands left for any definitions and \label etc in your document. Are the use cases for those two worth making the number of available commands 4 less (assuming they could be implemented using only 2 csnames each) – David Carlisle May 31 at 15:35
  • the last one is \DeclareRobustCommand and the second is \@ifdefined..\renewcommand (I can't think of many uses for that though) – David Carlisle May 31 at 15:54
  • 1
    What would be the purpose of these additional commands? Do you really want \declareexistingcommand{\box}{...} to be available to users? – egreg May 31 at 15:59
  • the last two are \let and \def ? – touhami May 31 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.