Greg.
--
---------------------------------------------------------------
Of all the things I lost, | Gregory....@advalvas.be
I miss my mind the most. | http://studwww.rug.ac.be/~gvanvoor/
(Steven Tyler ,Aerosmith) |
---------------------------------------------------------------
\makeatletter twiddles the catcode of `@' so that it can be used as
part of command names. this eases access to latex internal commands.
\makeatother reverses that change.
--
Robin Fairbairns, Cambridge
Every character you type is put into one of 15 categories by TeX. The
category of a character determines how TeX treats the character. For example
one category is `letters' another is `other symbols'. When you type a command
like \em TeX reads the `letters' following the backslash, in this case `em'.
Because `@' is not a letter TeX will interpret \two@digits as a command
sequence `two' the symbol `@' followed by the six letters d,i,g,i,t,s.
The at symbol `@' is initally in the `other' category, \makeatletter makes it
a `letter' this means that commands like \@addtoreset can be defined and
used. The command \two@digits will be interpreted as the command
`two@digits'. You might see some commands with @ in their names in the
preamble.
All of the internal commands of LaTeX have an @ in their names. This means
that they are inaccessible unless one first types \makeatletter. This is to
prevent users accidentally breaking some part of the LaTeX kernel by
redefining interal commands.
The \makeatletter allows a user to use the internal commands of LaTeX.
\makeatother puts things back to normal. These commands are not needed in
style files as there @ is normally a letter.
James
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Hi Greg,
In TeX, all characters have a 'category code' which denotes what these
characters are supposed to be, for instance 'letter' or 'other character'.
Commands like \whatever must not contain 'other characters' such as
@ (at). This is done in order to avoid clutter with low level
commands, such as \@ne \tw@ and so on. However, you can overwrite
this behaviour by saying that 'at' is to be seen as a 'letter'
(\makeatletter). This is often done in style files. Switching back to
default behaviour is done by \makeatother.
Happy TeXing,
Frank
--
Dr Frank Boehme | Email: f.bo...@cs.ucc.ie
National University of Ireland, Cork | phone: +353-21-903163
Dept of Computer Science | fax: +353-21-903113
Cork, Ireland | WWW: http://yeats.ucc.ie/~fboehme/