TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.
share|improve this question
The reason is that @ has category code 12 ("other"); you need to make it of category code 11 ("letter"); \makeatletter simply changes the catcode of @ to 11 (so now @ behaves like a normal letter) and \makeatother changes the catcode of @ to 12. – Gonzalo Medina Aug 18 '12 at 23:36
and the backslash \ is missing, i.e. fnum@figure vs \fnum@figure – Guido Aug 18 '12 at 23:43
@GonzaloMedina Nice to know. I had to google to understand. Thanks for the input. :-) – kan Aug 18 '12 at 23:45
up vote 6 down vote accepted

It should read as

\renewcommand{\fnum@figure}{\textsc{Figure ~\thefigure}}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.