Possible Duplicate:
Why do LaTeX internal commands have an @ in them?
What do \makeatletter and \makeatother do?
What is the difference between \myname and \my@name while writing a .cls file?
I have tried a few times to write/understand other peoples packages. Though I'm no good yet, I keep running into a definition using @
or @@
in the name. Why is this done ? Is there any special meaning ? Is this in any way related to the use of _ and __ in python, where a variable starting with @
shouldn't really be messed with while one with __ definitely should not be messed with ?
As an example :
\@author
is used in the class files article.cls but is not defined anywhere. So I assumed the @
to mean it was some kind of command internal to LaTeX/TeX. While in a custom class file (res.cls
by Michael DeCorte to be exact) I've seen \@name
is specifically defined as both
\def\name#1{\def\@name{#1}}
and
\def\@name{}
To my knowledge the latter ensures a default value is set up in case the \name
command is not used by the document writer. But this still doesn't indicate why the @
is used.
`
, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). – Martin Scharrer♦ May 14 '12 at 21:58