[latexrefman-commits] [SCM] latexrefman updated: r953 - trunk

Vincent Belaiche INVALID.NOREPLY at gnu.org.ua
Wed Aug 11 08:29:01 CEST 2021


Author: vincentb1
Date: 2021-08-11 06:29:01 +0000 (Wed, 11 Aug 2021)
New Revision: 953

Modified:
   trunk/ChangeLog
   trunk/latex2e.texi
Log:
[fr] Control sequences new node, and more.

* latex2e.texi (\newcommand & \renewcommand): ``alphabetic control
sequence'' -> ``control word''.
(Control sequences): new node.
(\newlength): ``@var{arg}'' -> ``\@var{len}''.
(\setlength, \addtolength, \settoheight, \settodepth, \settowidth):
``@var{len}'' -> ``\@var{len}''. Fix error messages description.
(\(SPACE)): Indicate leading blanks are ignored.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2021-08-10 21:16:55 UTC (rev 952)
+++ trunk/ChangeLog	2021-08-11 06:29:01 UTC (rev 953)
@@ -1,3 +1,13 @@
+2021-08-11  Vincent Bela\"iche  <vincentb1 at users.sourceforge.net>
+
+	* latex2e.texi (\newcommand & \renewcommand): ``alphabetic control
+	sequence'' -> ``control word''.
+	(Control sequences): new node.
+	(\newlength): ``@var{arg}'' -> ``\@var{len}''.
+	(\setlength, \addtolength, \settoheight, \settodepth, \settowidth):
+	``@var{len}'' -> ``\@var{len}''. Fix error messages description.
+	(\(SPACE)): Indicate leading blanks are ignored.
+
 2021-08-09  Jim Hefferon  <jhefferon at smcvt.edu>
         * latex2e.texi (Font sizes): Add paragraph on using font size
 	commands in formulas.

Modified: trunk/latex2e.texi
===================================================================
--- trunk/latex2e.texi	2021-08-10 21:16:55 UTC (rev 952)
+++ trunk/latex2e.texi	2021-08-11 06:29:01 UTC (rev 953)
@@ -131,6 +131,11 @@
 
 @c Best Effort Symbol
 @iftex
+ at macro visiblespace
+ at tex%
+{@tt at char`@ }%
+ at end tex at c
+ at end macro
 @macro BES {utf8,math}
 @math{\math\}
 @end macro
@@ -139,6 +144,9 @@
 @end macro
 @end iftex
 @ifnottex
+ at macro visiblespace
+ at w{ }
+ at end macro
 @macro BES {utf8,math}
 @U{\utf8\}
 @end macro
@@ -9463,10 +9471,11 @@
 
 @end table
 
- at TeX{} ignores spaces in the source following an alphabetic control
-sequence, as in @samp{\cmd }.  If you actually want a space there, one
-solution is to type @code{@{@}} after the command (@samp{\cmd@{@} }, and
-another solution is to use an explicit control space (@samp{\cmd\ }).
+ at TeX{} ignores blanks in the source following a control word
+(@pxref{Control sequences}), as in @samp{\cmd }.  If you actually want a
+space there, one solution is to type @code{@{@}} after the command
+(@samp{\cmd@{@} }, and another solution is to use an explicit control
+space (@samp{\cmd\ }).
 
 A simple example of defining a new command:
 @code{\newcommand@{\RS@}@{Robin Smith@}} results in @code{\RS} being
@@ -9536,7 +9545,51 @@
 is to put another pair of braces inside the definition:
 @code{\newcommand@{\shipname@}[1]@{@{\it #1@}@}}.
 
+ at menu
+* Control sequences:: Control sequence, control word and control symbol.
+ at end menu
 
+ at node Control sequences
+ at subsection Control sequence, control word and control symbol.
+
+When reading input @TeX{} converts the sequences of read characters into
+a sequence of @dfn{tokens}. When @TeX{} sees a backslash @code{\}, it
+will handle the following characters in a special way in order to make a
+ at dfn{control sequence} token.
+
+The control sequences fall into two catagories:
+
+ at itemize
+ at item
+ at dfn{control word}, when the control sequence is gathered from a
+ at code{\} followed by at least one ASCII letter, followed by at least one
+blank. The sequence of at least one ASCII letter is called the
+ at dfn{control sequence name}.
+ at item
+ at dfn{control symbol}, when the control sequence is gathered from a
+ at code{\} followed by one non-letter character.
+ at end itemize
+
+Blanks after a control word are ignored and do not produce any
+whitespace in the ouput (@pxref{\newcommand & \renewcommand} and
+ at ref{\(SPACE)}).
+
+Just as the @code{\relax} command does nothing, the following will print
+ at samp{Hello!}@inlinefmt{tex,---where we used visible spaces
+ at samp{@visiblespace{}} instead of blanks,}@inlinefmt{info,---if you use
+the Emacs info viewer at comma{} turn on the whitespace-mode minor mode to
+see the trailing spaces}:
+
+ at example
+Hel\relax at visiblespace{}@visiblespace{}@visiblespace{}
+ at visiblespace{}@visiblespace{}@visiblespace{}lo!
+ at end example
+
+ at noindent
+This is because blanks after @code{\relax}, including the newline are
+ignored, and blanks at the beginning of a line are also ignored
+(@pxref{Leading blanks}).
+
 @node \providecommand 
 @section @code{\providecommand}
 
@@ -9789,15 +9842,17 @@
 Synopsis:
 
 @example
-\newlength@{@var{arg}@}
+\newlength@{\@var{len}@}
 @end example
 
 Allocate a new length register (@pxref{Lengths}).  The required argument
- at var{arg} must begin with a backslash, @code{\}.  The new register holds
-rubber lengths such as @code{72.27pt} or @code{1in plus.2in minus.1in}
-(a @LaTeX{} length register is what plain @TeX{} calls a @code{skip}
-register).  The initial value is zero.  The control sequence
- at code{\@var{arg}} must not be already defined.
+ at code{\@var{len}} has to be a control sequence (@pxref{Control
+sequences}), and as such must begin with a backslash, @code{\} under
+normal circumstances.  The new register holds rubber lengths such as
+ at code{72.27pt} or @code{1in plus.2in minus.1in} (a @LaTeX{} length
+register is what plain @TeX{} calls a @code{skip} register).  The
+initial value is zero.  The control sequence @code{\@var{len}} must not
+be already defined.
 
 An example:
 
@@ -10996,14 +11051,15 @@
 Synopsis:
 
 @example
-\setlength@{@var{len}@}@{@var{amount}@}
+\setlength@{\@var{len}@}@{@var{amount}@}
 @end example
 
-Set the length @var{len} to @var{amount}.  The length name @var{len}
-must begin with a backslash, @code{\}.  The @code{amount} can be a
-rubber length (@pxref{Lengths}).  It can be positive, negative or zero,
-and can be in any units that @LaTeX{} understands (@pxref{Units of
-length}).
+Set the length \@var{len} to @var{amount}.  The length name
+ at code{\@var{len}} has to be a control sequence (@pxref{Control
+sequences}), and as such must begin with a backslash, @code{\} under
+normal circumstances.  The @var{amount} can be a rubber length
+(@pxref{Lengths}).  It can be positive, negative or zero, and can be in
+any units that @LaTeX{} understands (@pxref{Units of length}).
 
 Below, with @LaTeX{}'s defaults the first paragraph will be indented
 while the second will not.
@@ -11015,8 +11071,8 @@
 He said stop going to those places.
 @end example
 
-If you did not declare @var{len} with @code{\newlength}, for example if
-you mistype the above as
+If you did not declare \@var{len} with @code{\newlength}, for example if
+you mistype it as in
 @code{\newlength@{\specparindent@}\setlength@{\sepcparindent@}@{...@}},
 then you get an error like @samp{Undefined control sequence. <argument>
 \sepcindent}.  If you omit the backslash at the start of the length name
@@ -11033,14 +11089,15 @@
 Synopsis:
 
 @example
-\addtolength@{@var{len}@}@{@var{amount}@}
+\addtolength@{\@var{len}@}@{@var{amount}@}
 @end example
 
-Increment the length @var{len} by @var{amount}.  The length name
- at var{len} begins with a backslash, @code{\}.  The @code{amount} is a
-rubber length (@pxref{Lengths}).  It can be positive, negative or zero,
-and can be in any units that @LaTeX{} understands (@pxref{Units of
-length}).
+Increment the length \@var{len} by @var{amount}.  The length name
+ at code{\@var{len}} has to be a control sequence (@pxref{Control
+sequences}), and as such must begin with a backslash, @code{\} under
+normal circumstances.  The @var{amount} is a rubber length
+(@pxref{Lengths}).  It can be positive, negative or zero, and can be in
+any units that @LaTeX{} understands (@pxref{Units of length}).
 
 Below, if @code{\parskip} starts with the value @code{0pt plus 1pt} 
 
@@ -11054,15 +11111,18 @@
 @noindent
 then it has the value @code{1pt plus 1pt} for the second paragraph.
 
-If you did not declare the length @var{len} with @code{\newlength}, if
-for example you mistype the above as
+If you did not declare \@var{len} with @code{\newlength}, for example if
+you mistype it as in
+ at code{\newlength@{\specparindent@}\addtolength@{\sepcparindent@}@{...@}},
+then you get an error like @samp{Undefined control sequence. <argument>
+\sepcindent}. If the @var{amount} uses some length that has not been
+declared, for instance if for example you mistype the above as
 @code{\addtolength@{\specparindent@}@{0.6\praindent@}}, then you get
 something like @samp{Undefined control sequence. <argument> \praindent}.
-If you leave off the backslash at the start of @var{len}, as in
+If you leave off the backslash at the start of \@var{len}, as in
 @code{\addtolength@{parindent@}@{1pt@}}, then you get something like
 @samp{You can't use `the letter p' after \advance}.
 
-
 @node \settodepth
 @section @code{\settodepth}
 
@@ -11071,14 +11131,15 @@
 Synopsis:
 
 @example
-\settodepth@{@var{len}@}@{@var{text}@}
+\settodepth@{\@var{len}@}@{@var{text}@}
 @end example
 
-Set the length @var{len} to the depth of box that @LaTeX{} gets on
-typesetting the @var{text} argument.  The length name @var{len} must
-begin with a backslash, @code{\}.
+Set the length \@var{len} to the depth of box that @LaTeX{} gets on
+typesetting the @var{text} argument.  The length name @code{\@var{len}}
+has to be a control sequence (@pxref{Control sequences}), and as such
+must begin with a backslash, @code{\} under normal circumstances.
 
-This will show how low the character descenders go.
+This will print how low the character descenders go.
 
 @example
 \newlength@{\alphabetdepth@}
@@ -11086,10 +11147,10 @@
 \the\alphabetdepth
 @end example
 
-If you did not set aside the length @var{len}, if for example you
+If you did not declare \@var{len} with @code{\newlength}, if for example you
 mistype the above as @code{\settodepth@{\aplhabetdepth@}@{abc...@}},
 then you get something like @samp{Undefined control sequence. <argument>
-\aplhabetdepth}.  If you leave the backslash out of @var{len}, as in
+\aplhabetdepth}.  If you leave the backslash out of \@var{len}, as in
 @code{\settodepth@{alphabetdepth@}@{...@}} then you get something like
 @samp{Missing number, treated as zero. <to be read again> \setbox}.
 
@@ -11102,14 +11163,15 @@
 Synopsis:
 
 @example
-\settoheight@{@var{len}@}@{text@}
+\settoheight@{\@var{len}@}@{text@}
 @end example
 
-Sets the length @var{len} to the height of box that @LaTeX{} gets on
-typesetting the @code{text} argument.  The length name @var{len} must
-begin with a backslash, @code{\}.
+Sets the length \@var{len} to the height of box that @LaTeX{} gets on
+typesetting the @code{text} argument.  The length name @code{\@var{len}}
+has to be a control sequence (@pxref{Control sequences}), and as such
+must begin with a backslash, @code{\} under normal circumstances.
 
-This will show how high the characters go.
+This will print how high the characters go.
 
 @example
 \newlength@{\alphabetheight@}
@@ -11117,11 +11179,11 @@
 \the\alphabetheight
 @end example
 
-If no such length @var{len} has been declared with @code{\newlength}, if
+If no such length \@var{len} has been declared with @code{\newlength}, if
 for example you mistype as
 @code{\settoheight@{\aplhabetheight@}@{abc...@}}, then you get something
 like @samp{Undefined control sequence. <argument> \alphabetheight}.  If
-you leave the backslash out of @var{len}, as in
+you leave the backslash out of \@var{len}, as in
 @code{\settoheight@{alphabetheight@}@{...@}} then you get something like
 @samp{Missing number, treated as zero. <to be read again> \setbox}.
 
@@ -11134,14 +11196,15 @@
 Synopsis:
 
 @example
-\settowidth@{@var{len}@}@{@var{text}@}
+\settowidth@{\@var{len}@}@{@var{text}@}
 @end example
 
-Set the length @var{len} to the width of the box that @LaTeX{} gets on
-typesetting the @var{text} argument.  The length name @var{len} must
-begin with a backslash, @code{\}.
+Set the length \@var{len} to the width of the box that @LaTeX{} gets on
+typesetting the @var{text} argument.  The length name @code{\@var{len}}
+has to be a control sequence (@pxref{Control sequences}), and as such
+must begin with a backslash, @code{\} under normal circumstances.
 
-This measures the width of the lowercase ASCII alphabet.
+This prints the width of the lowercase ASCII alphabet.
 
 @example
 \newlength@{\alphabetwidth@}
@@ -11149,10 +11212,11 @@
 \the\alphabetwidth
 @end example
 
-If no such length @var{len} has been set aside, if for example you
-mistype the above as @code{\settowidth@{\aplhabetwidth@}@{abc...@}},
-then you get something like @samp{Undefined control sequence. <argument>
-\aplhabetwidth}.  If you leave the backslash out of @var{len}, as in
+If no such length \@var{len} has been declared with @code{\newlength},
+if for example you mistype the above as
+ at code{\settowidth@{\aplhabetwidth@}@{abc...@}}, then you get something
+like @samp{Undefined control sequence. <argument> \aplhabetwidth}.  If
+you leave the backslash out of \@var{len}, as in
 @code{\settoheight@{alphabetwidth@}@{...@}} then you get something like
 @samp{Missing number, treated as zero. <to be read again> \setbox}.
 
@@ -15255,9 +15319,23 @@
 an abbreviation instead of ending a sentence, as in @code{Prof.\ Smith}
 or @code{Jones et al.\ (1993)} (@pxref{\@@}).
 
-Under normal circumstances, @code{\}@key{tab} and @code{\}@key{newline}
+Under normal circumstances, @code{\}@key{TAB} and @code{\}@key{NEWLINE}
 are equivalent to backslash-space, @code{\ }.
 
+ at anchor{Leading blanks}
+Please also note that in order to allow source code indentation, under
+normal circumstances, @TeX{} ignores leading blanks in a line. So the
+following prints @samp{one word}:
+
+ at example
+one
+ word
+ at end example
+
+ at noindent
+where the white space between @samp{one} and @samp{word} is produced by
+the newline after @samp{one}, not by the space before @samp{word}.
+
 @c @PkgIndex{xspace}
 @c Some individual commands, notably those defined with the @code{xspace},
 @c package do not follow the standard behavior.



More information about the latexrefman-commits mailing list.