[Tex/LaTex] What’s wrong with this: \renewcommand{fnum@figure}{\textsc{Figure~\thefigure}}


As the title suggests, I am not sure why my file will not compile. Here is a MWE:

  \renewcommand{fnum@figure}{\textsc{Figure ~\thefigure}}

Here's an interesting part of the .log file:

 ! Missing control sequence inserted.
  <inserted text> 
 l.2 \renewcommand{fnum@figure}
                          {\textsc{Figure ~\thefigure}}
 Please don't say `\def cs{...}', say `\def\cs{...}'.
 I've inserted an inaccessible control sequence so that your
 definition will be completed without mixing me up too badly.
 You can recover graciously from this error, if you're
 careful; see exercise 27.2 in The TeXbook.

Best Answer

It should read as

\renewcommand{\fnum@figure}{\textsc{Figure ~\thefigure}}