Edit Note: I am trying to research "switches" (like \chapter), which led to this question. It might be helpful to tag this "switches".
I have seen a lot of documentation that appears to be using the @ symbol in a way that appears to separate a control sequence from a variable:
\@ptsizeThis control sequence is used to store the second digit of the pointsize we are typesetting in. So, normally, it’s value is one of 0, 1 or 2.1 (*
article|report|book)<p>2 <code>\newcommand\@ptsize{}</code></p>
From: CTAN documentation on the "Book" class., also in Memoir, etc.
However in other documentation sources, there doesn't seem to be a need for the @ symbol at all: LaTeX \if condition.
What is this symbol for, and more importantly: how should it actually be used?
@can not be defined or modified in preamble of documents (except if you make use of some tricks). So if some command is too important that shouldn't be changed without caution, they use@in its name, so no chance to destroy it. – Sigur Feb 23 '19 at 00:43_in other programming languages. In TeX_stands for very important things so@is chosen to play the role. – Symbol 1 Feb 23 '19 at 00:57plain.texcompletes its initialization of category codes by setting\catcode\@=11, thereby making the character@behave temporarily like a letter. The command\catcode`@=12will appear later, hence at-sign characters will act just like ordinary punctuation marks when TeX is running. The idea is to make it easy for plain TeX to have private control sequences that cannot be redefined by ordinary users; all such control sequences will have at least one@` in their names.” – Henri Menke Feb 23 '19 at 01:03!,?,_andexpl3does it for_and:. The official reference for such questions is, as mentioned in my previous comment, the TeXbook. – Henri Menke Feb 23 '19 at 01:30