[latexrefman-commits] r476 - in /trunk: ChangeLog latex2e.texi

jhefferon at domain.hid jhefferon at domain.hid
Thu Nov 26 14:05:58 CET 2015


Author: jhefferon
Date: Thu Nov 26 14:05:56 2015
New Revision: 476

URL: http://svn.gna.org/viewcvs/latexrefman?rev=476&view=rev
Log:
\makeatletter and \makeatother

Modified:
    trunk/ChangeLog
    trunk/latex2e.texi

Modified: trunk/ChangeLog
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/ChangeLog?rev=476&r1=475&r2=476&view=diff
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Thu Nov 26 14:05:56 2015
@@ -1,3 +1,8 @@
+2015-11-26  Jim Hefferon  <jhefferon at domain.hid>
+
+	* latex2e.texi (\makeatletter and \makeatother)  Add node for this,
+	as a subnode of the description of definition of commands.
+
 2015-11-25  Jim Hefferon  <jhefferon at domain.hid>
 
 	* latex2e.texi (Reserved characters)  Split out symbols by font

Modified: trunk/latex2e.texi
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e.texi?rev=476&r1=475&r2=476&view=diff
==============================================================================
--- trunk/latex2e.texi	(original)
+++ trunk/latex2e.texi	Thu Nov 26 14:05:56 2015
@@ -14,7 +14,7 @@
 @c xx ctan, distributions, components of TeX
 @c xx classes and packages -- required, additional, useful; oberdiek; fonts
 @c
- at domain.hid xx merge http://mirror.ctan.org/info/latex-info/ (alt-latex-info)
+ at c xx merge http://mirror.ctan.org/info/latex-info/ (CTAN pkg name: latex-info)
 @c xx merge http://mirror.ctan.org/latex2e-reference.tar.gz
 @c xx merge permuted-index
 @c xx merge latex-manual from savannah
@@ -478,6 +478,7 @@
 @menu
 * Environment::          Area of the source with distinct behavior.
 * Declaration::          Change the value or meaning of a command.
+* \makeatletter and \makeatother::    Change the status of the at-sign character.
 @end menu
 
 
@@ -524,6 +525,49 @@
 A command that changes the value, or changes the meaning, of some other
 command or parameter.  For instance, the @code{\mainmatter} command
 changes the setting of page numbers from roman numerals to arabic.
+
+
+ at node \makeatletter and \makeatother
+
+Synopsis:
+
+ at example
+\makeatletter
+  ... definition of commands with @@ in their name ..
+\makeatother
+ at end example
+
+Used to redefine internal @LaTeX{} commands.  @code{\makeatletter} makes
+the at-sign character at domain.hid{@@} have the category code of a letter,
+11.  @code{\makeatother} sets the category code of at domain.hid{@@} to 12,
+its original value.  Use these inside a @file{.tex} file, in the
+preamble, but not in @file{.sty} or @file{.cls} files.
+
+As each character is read by @TeX{} and @LaTeX{}, it is assigned a
+character code (for instance, the backslash at domain.hid{\} is assigned
+the character code 0, for characters that start a command).  These two
+commands alter the code assigned to @code{@@}.
+
+The alteration is needed because many of @LaTeX{}'s commands use
+ at code{@@} in their name, to prevent users from accidentally defining a
+command that replaces one of @LaTeX{}'s own.  Command names can only
+consist of a category at domain.hid character, ordinarily backslash, followed
+by at least one category at domain.hid character.  So under the default
+category codes, user-defined commands cannot contain an @code{@@}.  But
+ at code{\makeatletter} and @code{\makeatother} allow users to define or
+redefine commands named with @code{@@}.
+
+Put in the preamble, this redefines the section command (to center the
+section title and put it in bold type, as well as adjust the spacing).
+
+ at example
+\makeatletter
+\renewcommand\section at domain.hid @{section at domain.hid@@@}%
+                                   @{-3.5ex \@@plus -1ex \@@minus -.2ex@}%
+                                   @{2.3ex \@@plus.2ex@}%
+                                   @{\centering\normalfont\Large\bfseries@}@}
+\makeatother
+ at end example
 
 
 @node Document classes





More information about the latexrefman-commits mailing list