[texhax] latex command

Morten Høgholm morten.hoegholm at gmail.com
Mon Jun 22 09:22:54 CEST 2009


On Sun, Jun 21, 2009 at 7:13 PM, tom sgouros<tomfool at as220.org> wrote:
>
> Petr Sojka <sojka at fi.muni.cz> wrote:
>
>> Dear Tom,
>>
>> check your use of \makeatletter and \makeatother
>> and other means of setting \catcode of @.
>> The error apears when category code of @
>> during use mismatches the category code
>> set/fixed in the time of definition.
>> It is usually changed only \AtBeginDocument.
>
> That's funny.  It turned out that I had an errant @ not enclosed by
> \makeatletter and \makeatother a dozen lines above the apparent source
> of the problem.  It had been working fine until I added the \LaTeX
> command.  Curious, but it works now.  Are you suggesting I was
> inadvertently redefining \@?

Yup. It is very easy to do. Without \makeatletter before it, the definition
  \def\@whatever #1{foo bar #1}
will then define \@ as a control symbol which must be followed by the
letters "whatever" before reading its single argument. Since that is
rarely the case, you get the error message that
  "Use of \@ doesn't match its definition."
as soon you execute something using \@ such as \LaTeX (well, the \TeX
command at its end).
-- 
Morten


More information about the texhax mailing list