Commands that define or redefine a command or environment, such as the
\newcommand
and \renewenvironment
commands,
should not be nested within one another. Doing so may result in the
following TEX error:
! Illegal parameter number in definition of ... .