So I was trying to modify the default marginpar
command by making the margin text appear in italic. Now the following alone didn't work:
\renewcommand{\marginpar}[1]{\marginpar{\textit{#1}}}
Which to me would seem straight forward. Renew the \marginpar{}
command with the same \marginpar{}
that is defined by default and expand it by the italic part with the argument. As I mentioned, that didn't work.
This however did work:
\let\oldmarginpar\marginpar
\renewcommand{\marginpar}[1]{\oldmarginpar{\textit{{#1}}}}
So my question is, why is this step necessary to define a command that refers to marginpar
and then redefine that alternate command with renewcommand
. This process makes no sense to me.