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

Karl Berry INVALID.NOREPLY at gnu.org.ua
Wed Oct 4 18:15:57 CEST 2023


Author: karl
Date: 2023-10-04 16:15:57 +0000 (Wed, 04 Oct 2023)
New Revision: 1162

Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/latex2e.texi
Log:
(Special characters): new node

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2023-10-02 14:40:39 UTC (rev 1161)
+++ trunk/ChangeLog	2023-10-04 16:15:57 UTC (rev 1162)
@@ -1,3 +1,8 @@
+2023-10-04  Karl Berry  <karl at freefriends.org>
+
+	* latex2e.texi (Special characters): new node.
+	(Reserved characters): rename to `Printing special characters'.
+
 2023-10-02  Karl Berry  <karl at freefriends.org>
 
 	* latex2e.texi (@TeX{} engines): add hilatex.

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2023-10-02 14:40:39 UTC (rev 1161)
+++ trunk/NEWS	2023-10-04 16:15:57 UTC (rev 1162)
@@ -11,6 +11,7 @@
 * \thepage for page number representation.
 * \nobreakspace and U+00A0 synonyms for ties.
 * The (simple) \slash command.
+* Brief description of LaTeX's special characters (\ @ @ % $ & _ ^ # ~}.
 * Briefly mention hilatex and the hitex engine (https://ctan.org/pkg/hitex).
 
 Changes:

Modified: trunk/latex2e.texi
===================================================================
--- trunk/latex2e.texi	2023-10-02 14:40:39 UTC (rev 1161)
+++ trunk/latex2e.texi	2023-10-04 16:15:57 UTC (rev 1162)
@@ -32,8 +32,6 @@
 @c xx commands, though some are internal and shouldn't be included.
 @c xx classes.dtx et al. define additional commands.
 @c xx See also http://ctan.org/pkg/macros2e.
- at c 
- at c xx All the special characters should be definitively described.
 
 @copying
 This document is an unofficial reference manual for @LaTeX{}, a
@@ -294,11 +292,12 @@
 UTF-8 (as of 2018). The commands specify, for example, how the text
 should be formatted. 
 
- at LaTeX{} is implemented as a set of related so-called ``macros'' which
-use Donald at tie{}E. Knuth's @TeX{} typesetting program or one of its
-derivatives, collectively known as ``engines''. Thus, the user
-produces output, typically PDF, by giving the input file to a @TeX{}
-engine. (The following sections describe all this in more detail.)
+ at LaTeX{} is implemented as a set of so-called ``macros'' (a @TeX{}
+ at dfn{format}) which use Donald at tie{}E. Knuth's @TeX{} typesetting
+program or one of its derivatives, collectively known as
+``engines''. Thus, the user produces output, typically PDF, by giving
+the input file to a @TeX{} engine. The following sections describe
+all this in more detail.
 
 The term @LaTeX{} is also sometimes used to mean the language in which
 the input document is marked up, that is, to mean the set of commands
@@ -317,6 +316,7 @@
 * @TeX{} engines::          Programs that can compile @TeX{} and @LaTeX{}.
 * @LaTeX{} command syntax:: General syntax of @LaTeX{} commands.
 * Environment syntax::      \begin@{envname@} ... \end@{envname@}.
+* Special characters::      Characters with special meaning to @LaTeX{}
 * CTAN::                    The TeX world's general repository.
 @end menu
 
@@ -330,7 +330,7 @@
 @cindex hello, world
 
 @LaTeX{} files have a simple global structure, with a standard beginning
-and ending.  This is a small example.
+and ending.  Here is a small example:
 
 @example
 \documentclass@{article@}
@@ -345,10 +345,11 @@
 
 @cindex document class, defined
 @noindent
-Here, the @samp{article} is the @dfn{document class}.  It is implemented
-in a file @file{article.cls}.  You can use any document class on your
-system.  A few document classes are defined by @LaTeX{} itself, and vast
-array of others are widely available.  @xref{Document classes}.
+Here, the @samp{article} is the @dfn{document class}.  It is
+implemented in a file @file{article.cls}.  You can use any document
+class available on your system.  A few document classes are defined by
+ at LaTeX{} itself, and a vast array of others are available.
+ at xref{Document classes}.
 
 @cindex preamble, defined
 You can include other @LaTeX{} commands between the
@@ -355,11 +356,11 @@
 @code{\documentclass} and the @code{\begin@{document@}} commands.
 This area is called the @dfn{preamble}.
 
-The @code{\begin@{document@}}, @code{\end@{document@}} pair defines an
 @cindex environment
- at dfn{environment}; the @samp{document} environment (and no others) is
-required in all @LaTeX{} documents (@pxref{document}).  @LaTeX{} make
-available to you many environments that are documented here
+The @code{\begin@{document@}} @dots{} @code{\end@{document@}} pair
+defines an @dfn{environment}; the @samp{document} environment (and no
+others) is required in all @LaTeX{} documents (@pxref{document}).
+ at LaTeX{} provides many environments that are documented here
 (@pxref{Environments}).  Many more are available to you from external
 packages, most importantly those available at CTAN (@pxref{CTAN}).
 
@@ -542,7 +543,7 @@
 @end ftable
 
 As of 2019, there is a companion @code{-dev} command and format for
-all of the above except @code{hitex}.
+all of the above, except @code{hitex}:
 
 @ftable @code
 @item dvilualatex-dev
@@ -576,6 +577,10 @@
 @end ftable
 
 
+ at node Input text
+ at section Input text
+
+
 @node @LaTeX{} command syntax
 @section @LaTeX{} command syntax
 
@@ -587,10 +592,10 @@
 character, @code{\}.  The name itself then consists of either
 (a)@tie{}a string of letters or (b)@tie{}a single non-letter.
 
- at LaTeX{} commands names are case sensitive so that @code{\pagebreak}
-differs from @code{\Pagebreak} (the latter is not a standard command).
-Most command names are lowercase, but in any event you must enter all
-commands in the same case as they are defined.
+ at LaTeX{} commands names are case sensitive; for example,
+ at code{\pagebreak} differs from @code{\Pagebreak} (the latter is not a
+standard command).  Most command names are lowercase, but in any event
+you must enter all commands in the same case as they are defined.
 
 A command may be followed by zero, one, or more arguments. These
 arguments may be either required or optional.  Required arguments are
@@ -597,7 +602,8 @@
 contained in curly braces, @code{@{...@}}.  Optional arguments are
 contained in square brackets, @code{[...]}.  Generally, but not
 universally, if the command accepts an optional argument, it comes
-first, before any required arguments.
+first, before any required arguments; optional arguments could come
+after required arguments, or both before and after.
 
 Inside of an optional argument, to use the character close square
 bracket at tie{}(@code{]}) hide it inside curly braces, as
@@ -606,10 +612,10 @@
 the first character of the following text be an open square bracket,
 hide it inside curly braces.
 
- at LaTeX{} has the convention that some commands have a @code{*} form that
-is related to the form without a @code{*}, such as @code{\chapter} and
- at code{\chapter*}.  The exact difference in behavior varies from command
-to command.
+ at LaTeX{} has the convention that some commands have a @code{*} form
+that is closely related to the form without a @code{*}, such as
+ at code{\chapter} and @code{\chapter*}.  The difference in behavior
+varies from command to command.
 
 This manual describes all accepted options and @code{*}-forms for the
 commands it covers (barring unintentional omissions, a.k.a.@: bugs).
@@ -620,9 +626,10 @@
 As of the 2020-10-01 release of @LaTeX{}, the @package{expl3} and
 @package{xparse} packages are part of the @LaTeX{}2e format.  They
 provide a completely different underlying programming language
-syntax. We won't try to cover them in this document; see the related
+syntax. We won't try to cover that in this document; see the related
 package documentation and other @LaTeX{} manuals.
 
+
 @node Environment syntax
 @section Environment syntax
 
@@ -666,6 +673,83 @@
 @end example 
 
 
+ at node Special characters
+ at section Special characters: @code{\ @{ @} % $ & _ ^ # ~}
+
+ at anchor{Reserved characters}@c old node name
+ at cindex reserved characters, meaning of
+ at cindex special characters, meaning of
+ at cindex meaning of special characters
+
+Most input characters in @LaTeX{} print as themselves (to a first
+approximation; @pxref{Input text}), but a few have a special
+meaning to @LaTeX{}. They are called @dfn{reserved characters} or
+ at dfn{special characters}.  Here they are:
+
+ at table @samp
+ at item \
+ at findex \ @r{character}, meaning of
+ at cindex backslash, meaning of
+Introduces a command name, as seen throughout this manual.
+
+ at item @{
+ at itemx @}
+ at findex @{ @r{character}, meaning of
+ at findex @} @r{character}, meaning of
+ at cindex left brace, meaning of
+ at cindex right brace, meaning of
+ at cindex braces, meaning of
+ at cindex curly braces, meaning of
+Delimits a required argument to a command, as seen throughout this manual.
+
+ at item % 
+ at findex % @r{character}, meaning of
+ at cindex percent character, meaning of
+Starts a comment; the @samp{%} and all remaining characters on the
+current line are ignored.
+
+ at item $
+ at findex $ @r{character}, meaning of
+ at cindex dollar sign character, meaning of
+Starts and ends math mode (@pxref{Math formulas}).
+
+ at item &
+ at findex & @r{character}, meaning of
+ at cindex ampersand character, meaning of
+Separates cells in a table (@pxref{tabular}).
+
+ at item _ 
+ at itemx ^
+ at findex _ @r{character}, meaning of
+ at findex ^ @r{character}, meaning of
+ at cindex underscore character, meaning of
+ at cindex hat character, meaning of
+ at cindex caret character, meaning of
+Introduce a subscript or superscript in math (@pxref{Subscripts &
+superscripts}); they produce an error outside math mode.
+As a little-used special feature, two superscript characters in a row
+can introduce special notation for an arbitrary character;
+ at pxref{Input text}.
+
+ at item # 
+ at findex # @r{character}, meaning of
+ at cindex number sign character (@code{#}), meaning of
+ at cindex sharp character (@code{#}), meaning of
+ at cindex hash character (@code{#}), meaning of
+Stands for arguments in a macro definition (@pxref{\newcommand &
+\renewcommand}).
+
+ at item ~ 
+ at findex ~ @r{character}, meaning of
+ at cindex tilde character, meaning of
+Produces a nonbreakable interword space (@pxref{~}).
+
+ at end table
+
+ at xref{Printing special characters}, for how to typeset these
+characters when you need them literally.
+
+
 @node \DocumentMetadata
 @section @code{\DocumentMetadata}: Producing tagged PDF output
 
@@ -677,7 +761,9 @@
 
 The @code{\DocumentMetadata} command was added to @LaTeX{} in 2022.
 It enables so-called ``tagging'' of the PDF output, aiding
-accessibility of the PDF.
+accessibility of the PDF.  It is supported best with Lua at LaTeX{},
+while pdf at LaTeX{} and Xe at LaTeX{} are supported as well as possible
+(@pxref{@TeX{} engines}).
 
 It is unlike nearly any other command in @LaTeX{} in that it must
 occur before the @code{\documentclass} command that starts a @LaTeX{}
@@ -700,8 +786,8 @@
 @end example
 
 As you can see from the key name @code{testphase}, this is all still
-in an experimental phase. But the @LaTeX{} developers strongly
-encourage users to give it a try and report problems.
+in an experimental phase. The @LaTeX{} developers strongly encourage
+users to give it a try and report problems, so it can be improved.
 
 
 @node CTAN
@@ -9354,7 +9440,6 @@
 \renewcommand*@{\@var{cmd}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
 @end example
 
-
 Define or redefine a command (see also @code{\DeclareRobustCommand} in
 @ref{Class and package commands}).
 
@@ -18754,22 +18839,24 @@
 @end menu
 
 
- at node Reserved characters
- at section Reserved characters
+ at node Printing special characters
+ at section Printing special characters
 
- at cindex reserved characters
- at cindex characters, reserved
- at cindex special characters
- at cindex characters, special
- at LaTeX{} sets aside the following characters for special purposes. For
-example, the percent sign at tie{}@code{%} is for comments.  They are
-called @dfn{reserved characters} or @dfn{special characters}. They are
-all discussed elsewhere in this manual.
+ at cindex reserved characters, printing
+ at cindex special characters, printing
+ at cindex printing special characters
+ at cindex escaping special characters
 
+ at LaTeX{} sets aside a few characters for special purposes; they are
+called reserved characters or special characters. Here they are:
+
 @example
 # $ % & @{ @} _ ~ ^ \ 
 @end example
 
+The meaning of all the special characters is given elsewhere
+in this manual (@pxref{Reserved characters}).
+
 @findex \#
 @findex \$
 @findex \%
@@ -18779,8 +18866,8 @@
 @findex \@}
 If you want a reserved character to be printed as itself, in the text
 body font, for all but the final three characters in that list simply
-put a backslash at tie{}@code{\} in front of the character.  Thus,
-typing @code{\$1.23} will produce at tie{}@code{$1.23} in your output.
+put a @code{\} in front of the character.  Thus, typing @code{\$1.23}
+will produce @code{$1.23} in your output.
 
 @findex \~
 @findex \^ 
@@ -18791,13 +18878,13 @@
 font circumflex use @code{\^@{@}}.  To get a backslash in the font of
 the text body, enter @code{\textbackslash@{@}}.
 
-To produce the reserved characters in a typewriter font use
- at code{\verb!!} as below (the double backslash at tie{}@code{\\} in the
-example is only there to split the lines in the output).
+To produce the reserved characters in a typewriter font, use
+ at code{\verb!!} as below (the @code{\newline} in the example is there
+only to split the lines in the output).
 
 @example
 \begin@{center@}
-  \# \$ \% \& \@{ \@} \_ \~@{@} \^@{@} \textbackslash \\
+  \# \$ \% \& \@{ \@} \_ \~@{@} \^@{@} \textbackslash \newline
   \verb!# $ % & @{ @} _ ~ ^ \!
 \end@{center@}
 @end example



More information about the latexrefman-commits mailing list.