I am learning how to write a package by looking at code from existing packages. A nice one on GitHub (https://github.com/amunn/tikz-backgammon/blob/master/tikz-backgammon.sty) uses a lot of \newcommand definitions which contain the @ character (e.g. \bk@BW , \bk@doublestate etc.). Is this just a style of writing \newcommand or does the @ character have special significance?
Asked
Active
Viewed 37 times
1
Ted Black
- 453
- 2
- 8
@is a character that can normally not appear in macro names. It is allowed in macro names in.styfiles and if it is 'turned on' with\makeatletter ... \makeatother. This means that it is often used in 'internal' macros that package users should normally not have to interact with. Using unique prefixes (likebk) together with@can avoid name clashes. You can read more at https://tex.stackexchange.com/q/8351/35864. – moewe Mar 27 '21 at 08:24@,expl3uses_and:; ConTeXt uses_,!and?among others as reserved characters... – Mar 27 '21 at 08:25