19 Defining New Texinfo Commands

Texinfo provides several ways to define new commands (in all cases,
it’s not recommended to try redefining existing commands):

A Texinfo macro allows you to define a new Texinfo command as any
sequence of text and/or existing commands (including other macros). The
macro can have any number of parameters—text you supply each
time you use the macro.

Incidentally, these macros have nothing to do with the @defmac
command, which is for documenting macros in the subject area of the
manual (see Def Cmd Template).

‘@alias’ is a convenient way to define a new name for an existing
command.

‘@definfoenclose’ allows you to define new commands with
customized output for all non-TeX output formats.

Most generally of all (not just for defining new commands), it is
possible to invoke any external macro processor and have Texinfo
recognize so-called #line directives for error reporting.

If you want to do simple text substitution, @set and
@value is the simplest approach (see @set @clear @value).