GeneralAbout the symbol @ | learn to write LaTeX package

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
vita001
Posts: 17
Joined: Sun Mar 20, 2011 1:04 am

About the symbol @ | learn to write LaTeX package

Post by vita001 »

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.
Last edited by vita001 on Mon Jan 30, 2012 8:02 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

About the symbol @ | learn to write LaTeX package

Post by Stefan Kottwitz »

Hi,
vita001 wrote:The symbol @ is used everywhere in .cls files. But I cannot find a documentation about its usage.
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.

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.
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?
A good starting point is the LaTeX2ε for class and package writers aka clsguide. Have a look at 2.4 Command names.

Stefan
LaTeX.org admin
vita001
Posts: 17
Joined: Sun Mar 20, 2011 1:04 am

About the symbol @ | learn to write LaTeX package

Post by vita001 »

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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

About the symbol @ | learn to write LaTeX package

Post by Stefan Kottwitz »

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

Code: Select all

texdoc source2e
Stefan
LaTeX.org admin
Post Reply