changeset 26293:095eb3a04f43 stable

doc: grammarcheck m-file scripts ahead of 5.0 release. * flip.m, convhull.m, inputParser.m, inputname.m, mkoctfile.m, line.m, datestr.m: grammarcheck m-file scripts ahead of 5.0 release.
author Rik <rik@octave.org>
date Sun, 23 Dec 2018 12:16:19 -0800
parents d00577d95369
children 3c5863948bb3
files scripts/general/flip.m scripts/geometry/convhull.m scripts/miscellaneous/inputParser.m scripts/miscellaneous/inputname.m scripts/miscellaneous/mkoctfile.m scripts/plot/draw/line.m scripts/time/datestr.m
diffstat 7 files changed, 39 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/flip.m	Sun Dec 23 09:38:30 2018 -0800
+++ b/scripts/general/flip.m	Sun Dec 23 12:16:19 2018 -0800
@@ -28,7 +28,6 @@
 ## Examples:
 ##
 ## @example
-## @group
 ## ## row vector
 ## flip ([1  2  3  4])
 ##       @result{}  4  3  2  1
@@ -49,7 +48,6 @@
 ## flip ([1 2; 3 4], 2)
 ##       @result{}  2  1
 ##           4  3
-## @end group
 ## @end example
 ##
 ## @seealso{fliplr, flipud, rot90, rotdim, permute, transpose}
--- a/scripts/geometry/convhull.m	Sun Dec 23 09:38:30 2018 -0800
+++ b/scripts/geometry/convhull.m	Sun Dec 23 12:16:19 2018 -0800
@@ -26,7 +26,7 @@
 ##
 ## The hull @var{H} is a linear index vector into the original set of points
 ## that specifies which points form the enclosing hull.  For 2-D inputs only,
-## the output is ordered in a counter-clockwise manner around the hull.
+## the output is ordered in a counterclockwise manner around the hull.
 ##
 ## The input @var{x} may also be a matrix with two or three columns where the
 ## first column contains x-data, the second y-data, and the optional third
--- a/scripts/miscellaneous/inputParser.m	Sun Dec 23 09:38:30 2018 -0800
+++ b/scripts/miscellaneous/inputParser.m	Sun Dec 23 12:16:19 2018 -0800
@@ -24,18 +24,18 @@
 ## class supports four types of arguments:
 ##
 ## @enumerate
-## @item mandatory (see @command{addRequired});
+## @item mandatory (see @code{addRequired});
 ##
-## @item optional (see @command{addOptional});
+## @item optional (see @code{addOptional});
 ##
-## @item named (see @command{addParameter});
+## @item named (see @code{addParameter});
 ##
-## @item switch (see @command{addSwitch}).
+## @item switch (see @code{addSwitch}).
 ## @end enumerate
 ##
 ## After defining the function API with these methods, the supplied arguments
-## can be parsed with the @command{parse} method and the parsing results
-## accessed with the @command{Results} accessor.
+## can be parsed with the @code{parse} method and the parsing results
+## accessed with the @code{Results} accessor.
 ##
 ## @end deftypefn
 ## @deftypefn {} {} inputParser.Parameters
@@ -47,8 +47,8 @@
 ##
 ## @end deftypefn
 ## @deftypefn {} {} inputParser.Unmatched
-## Return structure similar to @command{Results}, but for unmatched parameters.
-## See the @command{KeepUnmatched} property.
+## Return structure similar to @code{Results}, but for unmatched parameters.
+## See the @code{KeepUnmatched} property.
 ##
 ## @end deftypefn
 ## @deftypefn {} {} inputParser.UsingDefaults
@@ -68,9 +68,9 @@
 ## Set whether an error should be given for non-defined arguments.  Defaults to
 ## false.  If set to true, the extra arguments can be accessed through
 ## @code{Unmatched} after the @code{parse} method.  Note that since
-## @command{Switch} and @command{Parameter} arguments can be mixed, it is
+## @code{Switch} and @code{Parameter} arguments can be mixed, it is
 ## not possible to know the unmatched type.  If argument is found unmatched
-## it is assumed to be of the @command{Parameter} type and it is expected to
+## it is assumed to be of the @code{Parameter} type and it is expected to
 ## be followed by a value.
 ##
 ## @end deftypefn
@@ -129,16 +129,16 @@
 ## @end example
 ##
 ## @emph{Note 1}: A function can have any mixture of the four API types but
-## they must appear in a specific order.  @command{Required} arguments must be
-## first and can be followed by any @command{Optional} arguments.  Only
-## the @command{Parameter} and @command{Switch} arguments may be mixed
+## they must appear in a specific order.  @code{Required} arguments must be
+## first and can be followed by any @code{Optional} arguments.  Only
+## the @code{Parameter} and @code{Switch} arguments may be mixed
 ## together and they must appear at the end.
 ##
-## @emph{Note 2}: If both @command{Optional} and @command{Parameter} arguments
+## @emph{Note 2}: If both @code{Optional} and @code{Parameter} arguments
 ## are mixed in a function API then once a string Optional argument fails to
-## validate it will be considered the end of the @command{Optional}
+## validate it will be considered the end of the @code{Optional}
 ## arguments.  The remaining arguments will be compared against any
-## @command{Parameter} or @command{Switch} arguments.
+## @code{Parameter} or @code{Switch} arguments.
 ##
 ## @seealso{nargin, validateattributes, validatestring, varargin}
 ## @end deftypefn
@@ -150,7 +150,7 @@
 ## inputParser to implement an ordered arguments type of API
 ##
 ## @var{argname} must be a string with the name of the new argument.  The order
-## in which new arguments are added with @command{addOptional}, represents the
+## in which new arguments are added with @code{addOptional}, represents the
 ## expected order of arguments.
 ##
 ## @var{default} will be the value used when the argument is not specified.
@@ -159,7 +159,7 @@
 ## values for the argument with name @var{argname}.  Alternatively, a
 ## function name can be used.
 ##
-## See @command{help inputParser} for examples.
+## See @code{help inputParser} for examples.
 ##
 ## @emph{Note}: if a string argument does not validate, it will be considered a
 ## ParamValue key.  If an optional argument is not given a validator, anything
@@ -183,7 +183,7 @@
 ## for the parameter with name @var{argname}.  Alternatively, a function name
 ## can be used.
 ##
-## See @command{help inputParser} for examples.
+## See @code{help inputParser} for examples.
 ##
 ## @end deftypefn
 
@@ -193,7 +193,7 @@
 ## Add new parameter to the object @var{parser} of the class inputParser to
 ## implement a name/value pair type of API.
 ##
-## This is an alias for @command{addParameter} method without the
+## This is an alias for @code{addParameter} method without the
 ## @qcode{"PartialMatchPriority"} option.  See it for the help text.
 ##
 ## @end deftypefn
@@ -207,17 +207,17 @@
 ## arguments type of API.
 ##
 ## @var{argname} must be a string with the name of the new argument.  The order
-## in which new arguments are added with @command{addrequired}, represents the
+## in which new arguments are added with @code{addrequired}, represents the
 ## expected order of arguments.
 ##
 ## @var{validator} is an optional function handle to validate the given values
 ## for the argument with name @var{argname}.  Alternatively, a function name
 ## can be used.
 ##
-## See @command{help inputParser} for examples.
+## See @code{help inputParser} for examples.
 ##
 ## @emph{Note}: this can be used together with the other type of arguments but
-## it must be the first (see @command{@@inputParser}).
+## it must be the first (see @code{@@inputParser}).
 ##
 ## @end deftypefn
 
@@ -236,7 +236,7 @@
 ## then after parsing the value of @var{parse}.Results.@var{argname} will be
 ## true.
 ##
-## See @command{help inputParser} for examples.
+## See @code{help inputParser} for examples.
 ##
 ## @end deftypefn
 
@@ -245,8 +245,8 @@
 ## Parses and validates list of arguments according to object @var{parser} of
 ## the class inputParser.
 ##
-## After parsing, the results can be accessed with the @command{Results}
-## accessor.  See @command{help inputParser} for a more complete description.
+## After parsing, the results can be accessed with the @code{Results}
+## accessor.  See @code{help inputParser} for a more complete description.
 ##
 ## @end deftypefn
 
--- a/scripts/miscellaneous/inputname.m	Sun Dec 23 09:38:30 2018 -0800
+++ b/scripts/miscellaneous/inputname.m	Sun Dec 23 12:16:19 2018 -0800
@@ -20,7 +20,7 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn {} {} inputname (@var{n})
+## @deftypefn  {} {} inputname (@var{n})
 ## @deftypefnx {} {} inputname (@var{n}, @var{ids_only})
 ## Return the name of the @var{n}-th argument to the calling function.
 ##
--- a/scripts/miscellaneous/mkoctfile.m	Sun Dec 23 09:38:30 2018 -0800
+++ b/scripts/miscellaneous/mkoctfile.m	Sun Dec 23 12:16:19 2018 -0800
@@ -107,6 +107,7 @@
 ## @code{mkoctfile}.
 ##
 ## @example
+## @group
 ##    AR
 ##    DEPEND_EXTRA_SED_PATTERN
 ##    DEPEND_FLAGS
@@ -119,19 +120,21 @@
 ##    LIBS
 ##    RANLIB
 ##    READLINE_LIBS
+## @end group
 ## @end example
 ##
 ## Octave configuration variables that are provided for informational
 ## purposes only.  Except for @samp{OCTAVE_HOME} and @samp{OCTAVE_EXEC_HOME},
 ## users may not override these variables.
 ##
-## If @env{OCTAVE_HOME} or @env{OCTAVE_EXEC_HOME} are set in the environment,
-## then other variables are adjusted accordingly with @env{OCTAVE_HOME} or
-## @env{OCTAVE_EXEC_HOME} substituted for the original value of the directory
-## specified by the @samp{--prefix} or @samp{--exec-prefix} options that were
-## used when Octave was configured.
+## If @w{@env{OCTAVE_HOME}} or @w{@env{OCTAVE_EXEC_HOME}} are set in the
+## environment, then other variables are adjusted accordingly with
+## @w{@env{OCTAVE_HOME}} or @w{@env{OCTAVE_EXEC_HOME}} substituted for the
+## original value of the directory specified by the @option{--prefix} or
+## @option{--exec-prefix} options that were used when Octave was configured.
 ##
 ## @example
+## @group
 ##    API_VERSION                 LOCALFCNFILEDIR
 ##    ARCHLIBDIR                  LOCALOCTFILEDIR
 ##    BINDIR                      LOCALSTARTUPFILEDIR
@@ -150,6 +153,7 @@
 ##    LOCALAPIFCNFILEDIR          STARTUPFILEDIR
 ##    LOCALAPIOCTFILEDIR          VERSION
 ##    LOCALARCHLIBDIR
+## @end group
 ## @end example
 ##
 ## @item --link-stand-alone
--- a/scripts/plot/draw/line.m	Sun Dec 23 09:38:30 2018 -0800
+++ b/scripts/plot/draw/line.m	Sun Dec 23 12:16:19 2018 -0800
@@ -33,7 +33,7 @@
 ## will attempt to orient scalars and vectors so the results can be plotted.
 ## This requires that one of the dimensions of the vector match either the
 ## number of rows or the number of columns of the matrix.
-## 
+##
 ## In the low-level calling form (50% higher performance) where the data is
 ## specified by name (@code{line ("xdata", @var{x}, @dots{})}) the data must be
 ## vectors.  If no data is specified (@code{line ()}) then
--- a/scripts/time/datestr.m	Sun Dec 23 09:38:30 2018 -0800
+++ b/scripts/time/datestr.m	Sun Dec 23 12:16:19 2018 -0800
@@ -24,7 +24,7 @@
 ## the result in @var{str}.
 ##
 ## @var{date} is a serial date number (see @code{datenum}), a date vector (see
-## @code{datevec}), or a a string or cell array of strings. In the latter case,
+## @code{datevec}), or a string or cell array of strings.  In the latter case,
 ## it is passed to @code{datevec} to guess the input date format.
 ##
 ## @var{f} can be an integer which corresponds to one of the codes in the table