[texhax] Problem with \LaTeX macro
Michael Barr
mbarr at math.mcgill.ca
Mon Apr 25 01:23:40 CEST 2005
As I thought I had explained, I was dealing with someone else's paper,
readying it for publication. As it turned out, that was the only instance
of \@ in the paper and I just deleted it and things were fine. But I did
want an explanation and this is it. Thanks.
On Sun, 24 Apr 2005, Robin Fairbairns wrote:
> > The following minimal file
> >
> > \documentclass{article}
> > \def\@{\char'100}
> > \begin{document}
> > \LaTeX 2e
> > \end{document}
> >
> > leads to an error message. If you remove the 2 it doesn't. Any number
> > from 1 to 7 will casue the error message, but 8 and 9 (nor any other
> > character I tested) does. The message is
> >
> > "Bad character code"
> >
> > and then "e". This occurs in a paper submitted by an online journal and I
> > can obviously do whatever he wants in a different, but I am curious what
> > is going on.
>
> 1) it's bad news to redefine an internal latex command, such as \@;
> latex has a tendency to use \@ all over the place, so you're going
> to get your \char'100 similarly all over the place. \LaTeX is a
> command that does that. it's because of the potential for this
> sort of error that the \newcommand command was designed.
> 2) there's a latex macro \LaTeXe for latex2e
> 3) you've committed the bug of not terminating the number in your
> command: \def\atsign{\char'100 } works fine. knuth has a lot about
> that bug in the texbook somewhere.
>
> finally, why do you want a macro to produce an @ sign? what do you
> have against typing @ when you need an @ sign?
>
More information about the texhax
mailing list