Hi,
The symbol @ is used everywhere in .cls files. But I cannot find a documentation about its usage. Anyone can give me some links to the documentation? I also want to learn how to write a Latex package. Which books/links are good starting points?
Thanks.
General ⇒ About the symbol @ | learn to write LaTeX package
About the symbol @ | learn to write LaTeX package
Last edited by vita001 on Mon Jan 30, 2012 8:02 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
About the symbol @ | learn to write LaTeX package
Hi,
Since commands with an @ in the name cannot be directly used within documents, it's a kind of protection to add @ to internal macro names, that's why class files use it.
Stefan
the character @ is used in names of internal commands, which are not intended to be used by document authors. Such commands may be changed, they can be even considered as unsupported.vita001 wrote:The symbol @ is used everywhere in .cls files. But I cannot find a documentation about its usage.
Since commands with an @ in the name cannot be directly used within documents, it's a kind of protection to add @ to internal macro names, that's why class files use it.
A good starting point is the LaTeX2ε for class and package writers aka clsguide. Have a look at 2.4 Command names.vita001 wrote:Anyone can give me some links to the documentation? I also want to learn how to write a Latex package. Which books/links are good starting points?
Stefan
LaTeX.org admin
About the symbol @ | learn to write LaTeX package
I read the "latex for class and package writers". It's a good but short introduction. I try to look at some .cls files to better understand how latex packages/classes work.
I encountered the follow code
\advance\textwidth-\sectionwidth
I try to look up what \advance does, but I get very little from the internet. TeX has \advance command but it is called by different format ( which is, \advance<name> by <number><unit>) so I guess Latex redefines the command somewhere but I could not find the place which documents this command.
Are there any places for complete reference of internal latex command used by the package/class writers? I googled and got some links like macro2e http://tex.stackexchange.com/questions/ ... l-commands. But the list seems incomplete. Any suggestions? Thanks.
I encountered the follow code
\advance\textwidth-\sectionwidth
I try to look up what \advance does, but I get very little from the internet. TeX has \advance command but it is called by different format ( which is, \advance<name> by <number><unit>) so I guess Latex redefines the command somewhere but I could not find the place which documents this command.
Are there any places for complete reference of internal latex command used by the package/class writers? I googled and got some links like macro2e http://tex.stackexchange.com/questions/ ... l-commands. But the list seems incomplete. Any suggestions? Thanks.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
About the symbol @ | learn to write LaTeX package
You could read in The Documented LaTeX2e Sources. It should already be included your TeX distribution with the file name source2e.pdf.
I usually open it at the command prompt by
Stefan
I usually open it at the command prompt by
Code: Select all
texdoc source2e
LaTeX.org admin