\DeclareTextCommandDefault & \ProvideTextCommandDefault (LaTeX2e unofficial reference manual (November 2018))

Next: \DeclareTextComposite, Previous: \DeclareTextCommand & \ProvideTextCommand, Up: fontenc package [Contents][Index]

#### 4.1.5 `\DeclareTextCommandDefault` & `\ProvideTextCommandDefault`

Synopsis:

    \DeclareTextCommandDefault{cmd}{defn}

or:

    \ProvideTextCommandDefault{cmd}{defn}

Give a default definition for cmd, for when that command is not defined in the encoding currently in force. This default should only use encodings known to be available.

This makes `\copyright` available.

    \DeclareTextCommandDefault{\copyright}{\textcircled{c}}

It uses only an encoding (OMS) that is always available.

The `\DeclareTextCommandDefault` should not occur in the encoding definition files since those files should declare only commands for use when you select that encoding. It should instead be in a package.

As with the related non-default commands, the `\ProvideTextCommandDefault` has exactly the same behavior as `\DeclareTextCommandDefault` except that it does nothing if cmd is already defined (see \DeclareTextCommand & \ProvideTextCommand). So, packages can use it to provide fallbacks that other packages can improve upon.

Unofficial LaTeX2e reference manual