[latexrefman-commits] r303 - in /trunk: ChangeLog latex2e-fr.texi latex2e.texi
karl at domain.hid
karl at domain.hid
Fri Oct 17 20:39:28 CEST 2014
Author: karl
Date: Fri Oct 17 20:39:28 2014
New Revision: 303
URL: http://svn.gna.org/viewcvs/latexrefman?rev=303&view=rev
Log:
default value of an optional argument is never "def"
Modified:
trunk/ChangeLog
trunk/latex2e-fr.texi (props changed)
trunk/latex2e.texi
Modified: trunk/ChangeLog
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/ChangeLog?rev=303&r1=302&r2=303&view=diff
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Fri Oct 17 20:39:28 2014
@@ -1,4 +1,8 @@
2014-10-17 Karl Berry <karl at domain.hid>
+
+ * latex2e.texi (\newcommand & \renewcommand): fix explanation of
+ optarg; its default value is never "def", that was a misreading
+ of latex209.dtx. Rename to optargval. From Vincent.
* latex2e.texi (\alph): avoid UTF-8 or @document*, sorry.
(\thinspace): this is not the place to use @dmn.
Propchange: trunk/latex2e-fr.texi
------------------------------------------------------------------------------
svn:keywords = Date Author Id
Modified: trunk/latex2e.texi
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e.texi?rev=303&r1=302&r2=303&view=diff
==============================================================================
--- trunk/latex2e.texi (original)
+++ trunk/latex2e.texi Fri Oct 17 20:39:28 2014
@@ -3481,8 +3481,8 @@
command, respectively. Synopses:
@example
- \newcommand[*]@{@var{cmd}@}[@var{nargs}][@var{optarg}]@{@var{defn}@}
-\renewcommand[*]@{@var{cmd}@}[@var{nargs}][@var{optarg}]@{@var{defn}@}
+ \newcommand[*]@{@var{cmd}@}[@var{nargs}][@var{optargval}]@{@var{defn}@}
+\renewcommand[*]@{@var{cmd}@}[@var{nargs}][@var{optargval}]@{@var{defn}@}
@end example
@table @var
@@ -3492,7 +3492,7 @@
multiple paragraphs of text (not @code{\long}, in plain @TeX{} terms).
@item cmd
-The command name beginning with @code{\}. For @code{\newcommand}, it
+The command name, beginning with @code{\}. For @code{\newcommand}, it
must not be already defined and must not begin with @code{\end}; for
@code{\renewcommand}, it must already be defined.
@@ -3501,12 +3501,14 @@
that the command will take. The default is for the command to have no
arguments.
- at domain.hid optarg
-If this optional parameter is present, it means that the command's
-first argument is optional. The default value of the optional
-argument (i.e., if it is not specified in the call) is @var{optarg},
-or, if that argument is present in the @code{\newcommand} but has an
-empty value, the string @samp{def}.
+ at item optargval
+If this optional parameter is present, it means that the first
+argument of command @var{cmd} is optional and its default value (i.e.,
+if it is not specified in the call) is @var{optarg}. In otherwise,
+when calling the macro, if no @code{[@var{value}]} is given after
+ at code{@var{cmd}}---which is different from having @code{[]} for an
+empty @var{value}---then string @samp{@var{optargval}} becomes the
+value of @code{#1} within @var{defn} when the macro is expanded.
@item defn
The text to be substituted for every occurrence of @code{cmd}; a
More information about the latexrefman-commits
mailing list