# What is the use of @ and @@ in variables names in TeX/LaTeX? [duplicate]

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.

-

## marked as duplicate by egreg, Caramdir, Werner, Martin Scharrer♦May 14 '12 at 22:05

This question was marked as an exact duplicate of an existing question.

Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, 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
We had this question before. I'm currently looking for it. – Martin Scharrer May 14 '12 at 22:01
Maybe this answer helps? – clemens May 14 '12 at 22:02
Oh dear, I did search for @ in the search bar and didn't get a response, that's why I posted I didn't realise it was a duplicate, sorry. – Carel May 14 '12 at 22:54
@Carel: No worries. It is pretty much impossible to search for this. – Caramdir May 15 '12 at 0:25