From b42ea9f9f810177a9a3a587ab46d46478dbc81f2 Mon Sep 17 00:00:00 2001 From: Hendrik Koerner Date: Fri, 15 Nov 2024 15:38:21 +0800 Subject: [PATCH 1/8] doc: Clarify size requirements of "lb" and "ub" in sqp (bug #66421). * scripts/optimization/sqp.m: Clarify size requirements of "lb" and "ub". --- scripts/optimization/sqp.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/optimization/sqp.m b/scripts/optimization/sqp.m index 2bd6eb8a52..2e3a0beaf7 100644 --- a/scripts/optimization/sqp.m +++ b/scripts/optimization/sqp.m @@ -117,11 +117,9 @@ ## ## @end ifnottex ## The fifth and sixth arguments, @var{lb} and @var{ub}, contain lower and -## upper bounds on @var{x}. These must be consistent with the equality and -## inequality constraints @var{g} and @var{h}. If the arguments are vectors -## then @var{x}(i) is bound by @var{lb}(i) and @var{ub}(i). A bound can also -## be a scalar in which case all elements of @var{x} will share the same -## bound. +## upper bounds on @var{x} and when provided must be vectors of the same size +## as the the vector @var{x0}. The bounds must be consistent with the +## equality and inequality constraints @var{g} and @var{h}. ## ## The seventh argument @var{maxiter} specifies the maximum number of ## iterations. The default value is 100. From b211c944ec28f20d89f030749f2cf4a45b029242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Wed, 20 Nov 2024 16:48:04 +0100 Subject: [PATCH 2/8] Avoid heap-buffer-overflow if xdata of patch object is a row vector (bug #66466). * libinterp/corefcn/graphics.cc (patch::properties::update_fvc): The "xdata" property of a patch graphics object is allowed to be a row vector (in which case it is treated like a column vector). In this case, check whether colors are set per vertex after the input has been transformed to column vectors. This avoids a potential heap-buffer-overflow when creating the "facevertexcdata" of the patch graphics object. --- libinterp/corefcn/graphics.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libinterp/corefcn/graphics.cc b/libinterp/corefcn/graphics.cc index e455b6ce79..745ec3b6b8 100644 --- a/libinterp/corefcn/graphics.cc +++ b/libinterp/corefcn/graphics.cc @@ -9691,10 +9691,6 @@ patch::properties::update_fvc () return; } - bool pervertex = false; - if (ncv == nv) - pervertex = true; - bool isRGB = false; if (cd.ndims () == 3) isRGB = true; @@ -9711,6 +9707,10 @@ patch::properties::update_fvc () zd = zd.as_column (); } + bool pervertex = false; + if (ncv == nv) + pervertex = true; + dv(0) = nv * nf; if (zd.isempty ()) dv(1) = 2; From 441c2eb5c61f0c98277fe487598316060bff7f6b Mon Sep 17 00:00:00 2001 From: pantxo Date: Wed, 20 Nov 2024 19:53:01 +0100 Subject: [PATCH 3/8] doc: Fix some missing white spaces in doc viewer (bug #66459). * data.cc, bessel.m, __unimplemented__.m, imagesc.m, image.m, movslice.m, movfun.m, hadamard.m, fplot.m, trapz.m, interp2.m, cumtrapz.m, rescale.m, speye.m, pcg.m, bicg.m, ode23.m, ode45.m, ode15s.m, ode23s.m, ode15i.m: If patterns such as "@w{@[qt]code{[.*]}" are followed by a white space, force the white space using "@ ". --- libinterp/corefcn/data.cc | 56 +++++++++++++++---------------- scripts/general/cumtrapz.m | 2 +- scripts/general/interp2.m | 2 +- scripts/general/rescale.m | 2 +- scripts/general/trapz.m | 2 +- scripts/help/bessel.m | 2 +- scripts/image/image.m | 2 +- scripts/image/imagesc.m | 2 +- scripts/ode/ode15i.m | 2 +- scripts/ode/ode15s.m | 2 +- scripts/ode/ode23.m | 2 +- scripts/ode/ode23s.m | 2 +- scripts/ode/ode45.m | 2 +- scripts/plot/draw/fplot.m | 2 +- scripts/signal/movfun.m | 4 +-- scripts/signal/movslice.m | 12 +++---- scripts/sparse/bicg.m | 10 +++--- scripts/sparse/pcg.m | 4 +-- scripts/sparse/speye.m | 2 +- scripts/specfun/nchoosek.m | 2 +- scripts/special-matrix/hadamard.m | 2 +- 21 files changed, 59 insertions(+), 59 deletions(-) diff --git a/libinterp/corefcn/data.cc b/libinterp/corefcn/data.cc index 3bd47fc6d2..cd2f8d3cd1 100644 --- a/libinterp/corefcn/data.cc +++ b/libinterp/corefcn/data.cc @@ -763,7 +763,7 @@ x - y .* floor (x ./ y) @noindent and is written such that the correct modulus is returned for integer types. This function handles negative values correctly. That is, -@w{@code{mod (-1, 3)}} is 2, not -1, as @w{@code{rem (-1, 3)}} returns. +@w{@code{mod (-1, 3)}}@ is 2, not -1, as @w{@code{rem (-1, 3)}}@ returns. An error results if the dimensions of the arguments do not agree, or if either of the arguments is complex. @@ -2537,7 +2537,7 @@ DEFUN (permute, args, , Return the generalized transpose for an N-D array object @var{A}. The permutation vector @var{perm} must contain the elements -@w{@code{1:ndims (A)}} (in any order, but each element must appear only +@w{@code{1:ndims (A)}}@ (in any order, but each element must appear only once). The @var{N}th dimension of @var{A} gets remapped to dimension @code{@var{PERM}(@var{N})}. For example: @@ -3373,7 +3373,7 @@ DEFUN (isinteger, args, , @deftypefn {} {@var{tf} =} isinteger (@var{x}) Return true if @var{x} is an integer object (int8, uint8, int16, etc.). -Note that @w{@code{isinteger (14)}} is false because numeric constants in +Note that @w{@code{isinteger (14)}}@ is false because numeric constants in Octave are double precision floating point values. @seealso{isfloat, ischar, islogical, isstring, isnumeric, isa} @end deftypefn */) @@ -3939,7 +3939,7 @@ DEFUN (isrow, args, , Return true if @var{x} is a row vector. A row vector is a 2-D array of any type for which @code{size (@var{x})} returns -@w{@code{[1, N]}} with non-negative N. +@w{@code{[1, N]}}@ with non-negative N. @seealso{iscolumn, isscalar, isvector, ismatrix, size} @end deftypefn */) { @@ -3988,7 +3988,7 @@ DEFUN (iscolumn, args, , Return true if @var{x} is a column vector. A column vector is a 2-D array of any type for which @code{size (@var{x})} -returns @w{@code{[N, 1]}} with non-negative N. +returns @w{@code{[N, 1]}}@ with non-negative N. @seealso{isrow, isscalar, isvector, ismatrix, size} @end deftypefn */) { @@ -4037,7 +4037,7 @@ DEFUN (ismatrix, args, , Return true if @var{x} is a 2-D array. A matrix is an array of any type where @code{ndims (@var{x}) == 2} and for -which @code{size (@var{x})} returns @w{@code{[M, N]}} with non-negative M and +which @code{size (@var{x})} returns @w{@code{[M, N]}}@ with non-negative M and N. @seealso{isscalar, isvector, iscell, isstruct, issparse, isa} @end deftypefn */) @@ -4086,7 +4086,7 @@ DEFUN (issquare, args, , Return true if @var{x} is a 2-D square array. A square array is a 2-D array of any type for which @code{size (@var{x})} -returns @w{@code{[N, N]}} where N is a non-negative integer. +returns @w{@code{[N, N]}}@ where N is a non-negative integer. @seealso{isscalar, isvector, ismatrix, size} @end deftypefn */) { @@ -6142,7 +6142,7 @@ DEFUN (norm, args, , @deftypefnx {} {@var{n} =} norm (@var{A}, @var{p}, @var{opt}) Compute the p-norm of the matrix @var{A}. -If the second argument is not given, @w{@code{p = 2}} is used. +If the second argument is not given, @w{@code{p = 2}}@ is used. If @var{A} is a matrix (or sparse matrix): @@ -6400,7 +6400,7 @@ This function is equivalent to the operator syntax @w{@code{! @var{x}}}. DEFUN (uplus, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{B} =} uplus (@var{A}) -This function and @w{@tcode{+ @var{A}}} are equivalent. +This function and @w{@tcode{+ @var{A}}}@ are equivalent. @seealso{uminus, plus} @end deftypefn */) { @@ -6410,7 +6410,7 @@ This function and @w{@tcode{+ @var{A}}} are equivalent. DEFUN (uminus, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{B} =} uminus (@var{A}) -This function and @w{@tcode{- @var{A}}} are equivalent. +This function and @w{@tcode{- @var{A}}}@ are equivalent. @seealso{uplus, minus} @end deftypefn */) { @@ -6422,7 +6422,7 @@ DEFUN (transpose, args, , @deftypefn {} {@var{B} =} transpose (@var{A}) Return the transpose of @var{A}. -This function and @tcode{@var{A}.'@:} are equivalent. +This function and @tcode{@var{A}.'@:}@ are equivalent. @seealso{ctranspose} @end deftypefn */) { @@ -6454,7 +6454,7 @@ DEFUN (ctranspose, args, , @deftypefn {} {@var{B} =} ctranspose (@var{A}) Return the complex conjugate transpose of @var{A}. -This function and @tcode{@var{A}'} are equivalent. +This function and @tcode{@var{A}'}@ are equivalent. @seealso{transpose} @end deftypefn */) { @@ -6520,7 +6520,7 @@ DEFUN (plus, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{C} =} plus (@var{A}, @var{B}) @deftypefnx {} {@var{C} =} plus (@var{A1}, @var{A2}, @dots{}) -This function and @w{@tcode{@var{A} + @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} + @var{B}}}@ are equivalent. If more arguments are given, the summation is applied cumulatively from left to right: @@ -6550,7 +6550,7 @@ cumulatively from left to right: DEFUN (minus, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{C} =} minus (@var{A}, @var{B}) -This function and @w{@tcode{@var{A} - @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} - @var{B}}}@ are equivalent. @seealso{plus, uminus} @end deftypefn */) { @@ -6563,7 +6563,7 @@ DEFUN (mtimes, args, , @deftypefnx {} {@var{C} =} mtimes (@var{A1}, @var{A2}, @dots{}) Return the matrix multiplication product of inputs. -This function and @w{@tcode{@var{A} * @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} * @var{B}}}@ are equivalent. If more arguments are given, the multiplication is applied cumulatively from left to right: @@ -6583,7 +6583,7 @@ DEFUN (mrdivide, args, , @deftypefn {} {@var{C} =} mrdivide (@var{A}, @var{B}) Return the matrix right division of @var{A} and @var{B}. -This function and @w{@tcode{@var{A} / @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} / @var{B}}}@ are equivalent. If the system is not square, or if the coefficient matrix is singular, a minimum norm solution is computed. @@ -6598,7 +6598,7 @@ DEFUN (mpower, args, , @deftypefn {} {@var{C} =} mpower (@var{A}, @var{B}) Return the matrix power operation of @var{A} raised to the @var{B} power. -This function and @w{@tcode{@var{A} ^ @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} ^ @var{B}}}@ are equivalent. @seealso{power, mtimes, plus, minus} @end deftypefn */) { @@ -6610,7 +6610,7 @@ DEFUN (mldivide, args, , @deftypefn {} {@var{C} =} mldivide (@var{A}, @var{B}) Return the matrix left division of @var{A} and @var{B}. -This function and @w{@tcode{@var{A} @backslashchar{} @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} @backslashchar{} @var{B}}}@ are equivalent. If the system is not square, or if the coefficient matrix is singular, a minimum norm solution is computed. @@ -6690,7 +6690,7 @@ DEFUN (times, args, , @deftypefnx {} {@var{C} =} times (@var{A1}, @var{A2}, @dots{}) Return the element-by-element multiplication product of inputs. -This function and @w{@tcode{@var{A} .* @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} .* @var{B}}}@ are equivalent. If more arguments are given, the multiplication is applied cumulatively from left to right: @@ -6710,7 +6710,7 @@ DEFUN (rdivide, args, , @deftypefn {} {@var{C} =} rdivide (@var{A}, @var{B}) Return the element-by-element right division of @var{A} and @var{B}. -This function and @w{@tcode{@var{A} ./ @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} ./ @var{B}}}@ are equivalent. @seealso{ldivide, mrdivide, times, plus} @end deftypefn */) { @@ -6723,7 +6723,7 @@ DEFUN (power, args, , Return the element-by-element operation of @var{A} raised to the @var{B} power. -This function and @w{@tcode{@var{A} .^ @var{B}}} are equivalent. +This function and @w{@tcode{@var{A} .^ @var{B}}}@ are equivalent. If several complex results are possible, returns the one with smallest non-negative argument (angle). Use @code{realpow}, @code{realsqrt}, @@ -6740,7 +6740,7 @@ DEFUN (ldivide, args, , @deftypefn {} {@var{C} =} ldivide (@var{A}, @var{B}) Return the element-by-element left division of @var{A} and @var{B}. -This function and @w{@tcode{@var{A} .@backslashchar{} @var{B}}} are +This function and @w{@tcode{@var{A} .@backslashchar{} @var{B}}}@ are equivalent. @seealso{rdivide, mldivide, times, plus} @end deftypefn */) @@ -6798,7 +6798,7 @@ Return the result of the colon expression corresponding to @var{base}, @var{limit}, and optionally, @var{increment}. This function is equivalent to the operator syntax -@w{@code{@var{base} : @var{limit}}} or +@w{@code{@var{base} : @var{limit}}}@ or @w{@code{@var{base} : @var{increment} : @var{limit}}}. @seealso{linspace} @end deftypefn */) @@ -7027,7 +7027,7 @@ For equal elements, the indices are such that equal elements are listed in the order in which they appeared in the original list. Sorting of complex entries is done first by magnitude -(@w{@code{abs (@var{z})}}) and for any ties by phase angle +(@w{@code{abs (@var{z})}})@ and for any ties by phase angle (@w{@code{angle (z)}}). For example: @example @@ -7559,7 +7559,7 @@ not given. Programming Note: nth_element encapsulates the C++ standard library algorithms nth_element and partial_sort. On average, the complexity of the -operation is O(M*log(K)), where @w{@code{M = size (@var{x}, @var{dim})}} and +operation is O(M*log(K)), where @w{@code{M = size (@var{x}, @var{dim})}}@ and @w{@code{K = length (@var{n})}}. This function is intended for cases where the ratio K/M is small; otherwise, it may be better to use @code{sort}. @seealso{sort, min, max} @@ -8255,7 +8255,7 @@ DEFUN (diff, args, , @deftypefn {} {@var{y} =} diff (@var{x}) @deftypefnx {} {@var{y} =} diff (@var{x}, @var{k}) @deftypefnx {} {@var{y} =} diff (@var{x}, @var{k}, @var{dim}) -If @var{x} is a vector of length @math{n}, @w{@code{diff (@var{x})}} is the +If @var{x} is a vector of length @math{n}, @w{@code{diff (@var{x})}}@ is the vector of first differences @tex $x_2 - x_1, \ldots{}, x_n - x_{n-1}$. @@ -8264,7 +8264,7 @@ vector of first differences @var{x}(2) - @var{x}(1), @dots{}, @var{x}(n) - @var{x}(n-1). @end ifnottex -If @var{x} is a matrix, @w{@code{diff (@var{x})}} is the matrix of column +If @var{x} is a matrix, @w{@code{diff (@var{x})}}@ is the matrix of column differences along the first non-singleton dimension. The second argument is optional. If supplied, @@ -8277,7 +8277,7 @@ non-singleton dimension. The dimension along which to take the difference can be explicitly stated with the optional variable @var{dim}. In this case the @var{k}-th order differences are calculated along this dimension. -In the case where @var{k} exceeds @w{@code{size (@var{x}, @var{dim})}} +In the case where @var{k} exceeds @w{@code{size (@var{x}, @var{dim})}}@ an empty matrix is returned. @seealso{sort, merge} @end deftypefn */) diff --git a/scripts/general/cumtrapz.m b/scripts/general/cumtrapz.m index 2097412cd3..eb6c60a4a9 100644 --- a/scripts/general/cumtrapz.m +++ b/scripts/general/cumtrapz.m @@ -30,7 +30,7 @@ ## Cumulative numerical integration of points @var{y} using the trapezoidal ## method. ## -## @w{@code{cumtrapz (@var{y})}} computes the cumulative integral of @var{y} +## @w{@code{cumtrapz (@var{y})}}@ computes the cumulative integral of @var{y} ## along the first non-singleton dimension. Where @code{trapz} reports only ## the overall integral sum, @code{cumtrapz} reports the current partial sum ## value at each point of @var{y}. diff --git a/scripts/general/interp2.m b/scripts/general/interp2.m index a514533d50..623f7d2d73 100644 --- a/scripts/general/interp2.m +++ b/scripts/general/interp2.m @@ -38,7 +38,7 @@ ## @var{x}, @var{y} can be matrices, as returned by @code{meshgrid}, in which ## case the sizes of @var{x}, @var{y}, and @var{z} must be equal. If @var{x}, ## @var{y} are vectors describing a grid then -## @w{@code{length (@var{x}) == columns (@var{z})}} and +## @w{@code{length (@var{x}) == columns (@var{z})}}@ and ## @w{@code{length (@var{y}) == rows (@var{z})}}. In either case the input ## data must be strictly monotonic. ## diff --git a/scripts/general/rescale.m b/scripts/general/rescale.m index 4d93bbaf5c..e77f20948e 100644 --- a/scripts/general/rescale.m +++ b/scripts/general/rescale.m @@ -40,7 +40,7 @@ ## the specified value @var{inmin} with @var{inmin}. Similarly, the optional ## input @qcode{"inputmax"} replaces all elements greater than the specified ## value @var{inmax} with @var{inmax}. If unspecified the minimum and maximum -## are taken from the data itself (@w{@code{@var{inmin} = min (A(:))}} and +## are taken from the data itself (@w{@code{@var{inmin} = min (A(:))}}@ and ## @w{@code{@var{inmax} = max (A(:))}}). ## ## Programming Notes: diff --git a/scripts/general/trapz.m b/scripts/general/trapz.m index d9ef7a222c..12164ae906 100644 --- a/scripts/general/trapz.m +++ b/scripts/general/trapz.m @@ -31,7 +31,7 @@ ## Numerically evaluate the integral of points @var{y} using the trapezoidal ## method. ## -## @w{@code{trapz (@var{y})}} computes the integral of @var{y} along the first +## @w{@code{trapz (@var{y})}}@ computes the integral of @var{y} along the first ## non-singleton dimension. When the argument @var{x} is omitted an equally ## spaced @var{x} vector with unit spacing (1) is assumed. ## @code{trapz (@var{x}, @var{y})} evaluates the integral with respect to the diff --git a/scripts/help/bessel.m b/scripts/help/bessel.m index f3544d159d..f96c29c220 100644 --- a/scripts/help/bessel.m +++ b/scripts/help/bessel.m @@ -54,7 +54,7 @@ ## @item besselh ## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k} = 2) ## kind. If the argument @var{opt} is supplied, the result is multiplied by -## @w{@code{exp (-I*@var{x})}} for @var{k} = 1 or @w{@code{exp (I*@var{x})}} +## @w{@code{exp (-I*@var{x})}}@ for @var{k} = 1 or @w{@code{exp (I*@var{x})}}@ ## for @var{k} = 2. ## @end table ## diff --git a/scripts/image/image.m b/scripts/image/image.m index 75c09dd967..71b852729f 100644 --- a/scripts/image/image.m +++ b/scripts/image/image.m @@ -35,7 +35,7 @@ ## ## @var{x} and @var{y} are optional 2-element vectors, @w{@code{[min, max]}}, ## which specify the coordinates of the centers of the corner pixels. -## If a range is specified as @w{@code{[max, min]}} then the image will be +## If a range is specified as @w{@code{[max, min]}}@ then the image will be ## reversed along that axis. For convenience, @var{x} and @var{y} may be ## specified as N-element vectors matching the length of the data in @var{img}. ## However, only the first and last elements will be used to determine the axis diff --git a/scripts/image/imagesc.m b/scripts/image/imagesc.m index 87fb70f9f8..bd6f971a4c 100644 --- a/scripts/image/imagesc.m +++ b/scripts/image/imagesc.m @@ -39,7 +39,7 @@ ## ## @var{x} and @var{y} are optional 2-element vectors, @w{@code{[min, max]}}, ## which specify the coordinates of the centers of the corner pixels. -## If a range is specified as @w{@code{[max, min]}} then the image will be +## If a range is specified as @w{@code{[max, min]}}@ then the image will be ## reversed along that axis. For convenience, @var{x} and @var{y} may be ## specified as N-element vectors matching the length of the data in @var{img}. ## However, only the first and last elements will be used to determine diff --git a/scripts/ode/ode15i.m b/scripts/ode/ode15i.m index 01c5331638..3637820206 100644 --- a/scripts/ode/ode15i.m +++ b/scripts/ode/ode15i.m @@ -68,7 +68,7 @@ ## field @var{x} containing a row vector of times where the solution was ## evaluated and a field @var{y} containing the solution matrix such that each ## column corresponds to a time in @var{x}. Use -## @w{@code{fieldnames (@var{solution})}} to see the other fields and +## @w{@code{fieldnames (@var{solution})}}@ to see the other fields and ## additional information returned. ## ## If no output arguments are requested, and no @qcode{"OutputFcn"} is diff --git a/scripts/ode/ode15s.m b/scripts/ode/ode15s.m index e2fc4c0963..3c72b0c008 100644 --- a/scripts/ode/ode15s.m +++ b/scripts/ode/ode15s.m @@ -62,7 +62,7 @@ ## field @var{x} containing a row vector of times where the solution was ## evaluated and a field @var{y} containing the solution matrix such that each ## column corresponds to a time in @var{x}. Use -## @w{@code{fieldnames (@var{solution})}} to see the other fields and +## @w{@code{fieldnames (@var{solution})}}@ to see the other fields and ## additional information returned. ## ## If no output arguments are requested, and no @qcode{"OutputFcn"} is diff --git a/scripts/ode/ode23.m b/scripts/ode/ode23.m index 3d22c9574c..531bc14861 100644 --- a/scripts/ode/ode23.m +++ b/scripts/ode/ode23.m @@ -65,7 +65,7 @@ ## field @var{x} containing a row vector of times where the solution was ## evaluated and a field @var{y} containing the solution matrix such that each ## column corresponds to a time in @var{x}. Use -## @w{@code{fieldnames (@var{solution})}} to see the other fields and +## @w{@code{fieldnames (@var{solution})}}@ to see the other fields and ## additional information returned. ## ## If no output arguments are requested, and no @qcode{"OutputFcn"} is diff --git a/scripts/ode/ode23s.m b/scripts/ode/ode23s.m index 0e778e569e..2c1df22bac 100644 --- a/scripts/ode/ode23s.m +++ b/scripts/ode/ode23s.m @@ -72,7 +72,7 @@ ## field @var{x} containing a row vector of times where the solution was ## evaluated and a field @var{y} containing the solution matrix such that each ## column corresponds to a time in @var{x}. Use -## @w{@code{fieldnames (@var{solution})}} to see the other fields and +## @w{@code{fieldnames (@var{solution})}}@ to see the other fields and ## additional information returned. ## ## If using the @qcode{"Events"} option then three additional outputs may be diff --git a/scripts/ode/ode45.m b/scripts/ode/ode45.m index 9d5e807222..b691c98658 100644 --- a/scripts/ode/ode45.m +++ b/scripts/ode/ode45.m @@ -65,7 +65,7 @@ ## field @var{x} containing a row vector of times where the solution was ## evaluated and a field @var{y} containing the solution matrix such that each ## column corresponds to a time in @var{x}. Use -## @w{@code{fieldnames (@var{solution})}} to see the other fields and +## @w{@code{fieldnames (@var{solution})}}@ to see the other fields and ## additional information returned. ## ## If no output arguments are requested, and no @qcode{"OutputFcn"} is diff --git a/scripts/plot/draw/fplot.m b/scripts/plot/draw/fplot.m index 31e4c00938..010e9f0b00 100644 --- a/scripts/plot/draw/fplot.m +++ b/scripts/plot/draw/fplot.m @@ -37,7 +37,7 @@ ## @var{fcn} is a function handle, inline function, or string containing the ## name of the function to evaluate. ## -## The limits of the plot are of the form @w{@code{[@var{xlo}, @var{xhi}]}} or +## The limits of the plot are of the form @w{@code{[@var{xlo}, @var{xhi}]}}@ or ## @w{@code{[@var{xlo}, @var{xhi}, @var{ylo}, @var{yhi}]}}. If no limits ## are specified the default is @code{[-5, 5]}. ## diff --git a/scripts/signal/movfun.m b/scripts/signal/movfun.m index 4f38aae1e1..f138cb2583 100644 --- a/scripts/signal/movfun.m +++ b/scripts/signal/movfun.m @@ -96,8 +96,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/signal/movslice.m b/scripts/signal/movslice.m index 190956989a..d8fea02add 100644 --- a/scripts/signal/movslice.m +++ b/scripts/signal/movslice.m @@ -33,11 +33,11 @@ ## ## The moving window length input @var{wlen} can either be a scalar not equal ## to 1 or a 2-element array of integers. For scalar values, if odd the window -## is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on either -## side of the central element. If @var{wlen} is even the window is asymmetric -## and has @w{@code{@var{wlen}/2}} elements to the left of the central element -## and @w{@code{@var{wlen}/2 - 1}} elements to the right of the central -## element. When @var{wlen} is a 2-element array, +## is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements on +## either side of the central element. If @var{wlen} is even the window is +## asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. When @var{wlen} is a 2-element array, ## @w{@code{[@var{nb}, @var{na}]}}, the window includes @var{nb} elements to ## the left of the current element and @var{na} elements to the right of the ## current element. @@ -45,7 +45,7 @@ ## The output @var{slcidx} is an array of indices of the slices that fit fully ## within the vector, where each column is an individual slice as the window ## moves from left to right. The slices have @var{wlen} elements for scalar -## @var{wlen}, or @w{@code{@var{nb} + @var{na} + 1}} elements for array valued +## @var{wlen}, or @w{@code{@var{nb} + @var{na} + 1}}@ elements for array valued ## @var{wlen}. ## ## Optional output @var{C} is an row vector of window center positions where diff --git a/scripts/sparse/bicg.m b/scripts/sparse/bicg.m index f74ae6a624..d0467c6b55 100644 --- a/scripts/sparse/bicg.m +++ b/scripts/sparse/bicg.m @@ -34,7 +34,7 @@ ## @deftypefnx {} {@var{x} =} bicg (@var{A}, @var{b}, @var{tol}, @var{maxit}, @var{M}, [], @var{x0}, @dots{}) ## @deftypefnx {} {@var{x} =} bicg (@var{A}, @var{b}, @var{tol}, @var{maxit}, @var{M1}, @var{M2}, @var{x0}, @dots{}) ## @deftypefnx {} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}] =} bicg (@var{A}, @var{b}, @dots{}) -## Solve the linear system of equations @w{@code{@var{A} * @var{x} = @var{b}}} +## Solve the linear system of equations @w{@code{@var{A} * @var{x} = @var{b}}}@ ## by means of the Bi-Conjugate Gradient iterative method. ## ## The input arguments are: @@ -43,7 +43,7 @@ ## ## @item @var{A} is the matrix of the linear system and it must be square. ## @var{A} can be passed as a matrix, function handle, or inline function -## @code{Afcn} such that @w{@code{Afcn (x, "notransp") = A * x}} and +## @code{Afcn} such that @w{@code{Afcn (x, "notransp") = A * x}}@ and ## @w{@code{Afcn (x, "transp") = A' * x}}. Additional parameters to ## @code{Afcn} may be passed after @var{x0}. ## @@ -65,9 +65,9 @@ ## @var{M1}, @var{M2} are the preconditioners. The preconditioner @var{M} is ## given as @code{@var{M} = @var{M1} * @var{M2}}. Both @var{M1} and @var{M2} ## can be passed as a matrix or as a function handle or inline function -## @code{g} such that @w{@code{g (@var{x}, "notransp") = @var{M1} \ @var{x}}} -## or @w{@code{g (@var{x}, "notransp") = @var{M2} \ @var{x}}} and -## @w{@code{g (@var{x}, "transp") = @var{M1}' \ @var{x}}} or +## @code{g} such that @w{@code{g (@var{x}, "notransp") = @var{M1} \ @var{x}}}@ +## or @w{@code{g (@var{x}, "notransp") = @var{M2} \ @var{x}}}@ and +## @w{@code{g (@var{x}, "transp") = @var{M1}' \ @var{x}}}@ or ## @w{@code{g (@var{x}, "transp") = @var{M2}' \ @var{x}}}. ## If @var{M1} is omitted or empty, then preconditioning is not applied. ## The preconditioned system is theoretically equivalent to applying the diff --git a/scripts/sparse/pcg.m b/scripts/sparse/pcg.m index e4af14213b..435745d418 100644 --- a/scripts/sparse/pcg.m +++ b/scripts/sparse/pcg.m @@ -28,7 +28,7 @@ ## @deftypefnx {} {@var{x} =} pcg (@var{A}, @var{b}, @var{tol}, @var{maxit}, @var{M}, [], @var{x0}, @dots{}) ## @deftypefnx {} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}, @var{eigest}] =} pcg (@var{A}, @var{b}, @dots{}) ## -## Solve the linear system of equations @w{@code{@var{A} * @var{x} = @var{b}}} +## Solve the linear system of equations @w{@code{@var{A} * @var{x} = @var{b}}}@ ## by means of the Preconditioned Conjugate Gradient iterative method. ## ## The input arguments are: @@ -60,7 +60,7 @@ ## @item ## @var{m} is a @nospell{HPD} preconditioning matrix. For any decomposition ## @code{@var{m} = @var{p1} * @var{p2}} such that -## @w{@code{inv (@var{p1}) * @var{A} * inv (@var{p2})}} is @nospell{HPD}, the +## @w{@code{inv (@var{p1}) * @var{A} * inv (@var{p2})}}@ is @nospell{HPD}, the ## conjugate gradient method is formally applied to the linear system ## @w{@code{inv (@var{p1}) * @var{A} * inv (@var{p2}) * @var{y} = inv ## (@var{p1}) * @var{b}}}, diff --git a/scripts/sparse/speye.m b/scripts/sparse/speye.m index df0b25af45..fab628ae17 100644 --- a/scripts/sparse/speye.m +++ b/scripts/sparse/speye.m @@ -30,7 +30,7 @@ ## Return a sparse identity matrix of size @var{m}x@var{n}. ## ## The implementation is significantly more efficient than -## @w{@code{sparse (eye (@var{m}))}} as the full matrix is not constructed. +## @w{@code{sparse (eye (@var{m}))}}@ as the full matrix is not constructed. ## ## When called with a single argument, a square matrix of size ## @var{m}-by-@var{m} is created. If called with a single vector argument, diff --git a/scripts/specfun/nchoosek.m b/scripts/specfun/nchoosek.m index 44ef85149c..6a6b731c00 100644 --- a/scripts/specfun/nchoosek.m +++ b/scripts/specfun/nchoosek.m @@ -58,7 +58,7 @@ ## If the first argument is a vector, @var{set}, then generate all ## combinations of the elements of @var{set}, taken @var{k} at a time, with ## one row per combination. The result @var{c} has @var{k} columns and -## @w{@code{nchoosek (length (@var{set}), @var{k})}} rows. +## @w{@code{nchoosek (length (@var{set}), @var{k})}}@ rows. ## ## For example: ## diff --git a/scripts/special-matrix/hadamard.m b/scripts/special-matrix/hadamard.m index 093d4dedb0..f83003f124 100644 --- a/scripts/special-matrix/hadamard.m +++ b/scripts/special-matrix/hadamard.m @@ -32,7 +32,7 @@ ## ## The size @var{n} must be of the form @math{2^k * p} in which p is one of ## 1, 12, 20 or 28. The returned matrix is normalized, meaning -## @w{@code{Hn(:,1) == 1}} and @w{@code{Hn(1,:) == 1}}. +## @w{@code{Hn(:,1) == 1}}@ and @w{@code{Hn(1,:) == 1}}. ## ## Some of the properties of Hadamard matrices are: ## From 74b647a55f36845a33fe654664d1fcf239c7309d Mon Sep 17 00:00:00 2001 From: Rik Date: Sat, 23 Nov 2024 13:17:04 -0800 Subject: [PATCH 4/8] gui: Fix presentation of @w TexInfo macro for Qt (bug #66459) * doc/interpreter/basics.txi, doc/interpreter/expr.txi, doc/interpreter/external.txi, doc/interpreter/install.txi, doc/interpreter/oop.txi, doc/interpreter/package.txi, doc/interpreter/plot.txi, libinterp/corefcn/bitfcns.cc, libinterp/corefcn/chol.cc, libinterp/corefcn/environment.cc, libinterp/corefcn/oct-hist.cc, libinterp/corefcn/qr.cc, scripts/help/__unimplemented__.m, scripts/help/bessel.m, scripts/io/csvwrite.m, scripts/linear-algebra/linsolve.m, scripts/plot/appearance/view.m, scripts/plot/util/groot.m, scripts/signal/movfun.m, scripts/sparse/bicg.m, scripts/sparse/pcg.m, scripts/statistics/corr.m, scripts/statistics/cov.m, scripts/statistics/kurtosis.m, scripts/statistics/movmad.m, scripts/statistics/movmax.m, scripts/statistics/movmean.m, scripts/statistics/movmedian.m, scripts/statistics/movmin.m, scripts/statistics/movprod.m, scripts/statistics/movstd.m, scripts/statistics/movsum.m, scripts/statistics/movvar.m: Use macro "@ " instead of bare space after @w macro to force a space. --- doc/interpreter/basics.txi | 8 ++++---- doc/interpreter/expr.txi | 4 ++-- doc/interpreter/external.txi | 5 +++-- doc/interpreter/install.txi | 2 +- doc/interpreter/oop.txi | 4 ++-- doc/interpreter/package.txi | 8 ++++---- doc/interpreter/plot.txi | 12 ++++++------ libinterp/corefcn/bitfcns.cc | 4 ++-- libinterp/corefcn/chol.cc | 6 +++--- libinterp/corefcn/environment.cc | 6 +++--- libinterp/corefcn/oct-hist.cc | 9 +++++---- libinterp/corefcn/qr.cc | 4 ++-- scripts/help/__unimplemented__.m | 2 +- scripts/help/bessel.m | 4 ++-- scripts/io/csvwrite.m | 2 +- scripts/linear-algebra/linsolve.m | 2 +- scripts/plot/appearance/view.m | 10 ++++++---- scripts/plot/util/groot.m | 4 ++-- scripts/signal/movfun.m | 16 ++++++++-------- scripts/sparse/bicg.m | 10 ++++++---- scripts/sparse/pcg.m | 5 +++-- scripts/statistics/corr.m | 2 +- scripts/statistics/cov.m | 2 +- scripts/statistics/kurtosis.m | 2 +- scripts/statistics/movmad.m | 16 ++++++++-------- scripts/statistics/movmax.m | 16 ++++++++-------- scripts/statistics/movmean.m | 16 ++++++++-------- scripts/statistics/movmedian.m | 16 ++++++++-------- scripts/statistics/movmin.m | 16 ++++++++-------- scripts/statistics/movprod.m | 16 ++++++++-------- scripts/statistics/movstd.m | 16 ++++++++-------- scripts/statistics/movsum.m | 16 ++++++++-------- scripts/statistics/movvar.m | 16 ++++++++-------- 33 files changed, 142 insertions(+), 135 deletions(-) diff --git a/doc/interpreter/basics.txi b/doc/interpreter/basics.txi index 7f331611ab..a331042a1d 100644 --- a/doc/interpreter/basics.txi +++ b/doc/interpreter/basics.txi @@ -123,8 +123,8 @@ Print short help message and exit. Add path to the head of the search path for images. The value of @var{path} specified on the command line will override any value of @w{@env{OCTAVE_IMAGE_PATH}}@ found in the environment, but not any commands -in the system or user startup files that call the @w{@env{IMAGE_PATH}}@ -function. +in the system or user startup files that call the +@w{@env{IMAGE_PATH}}@ function. @item --info-file @var{filename} @cindex @sortas{options, Octave command --info-file} @ @ @code{--info-file @var{filename}} @@ -355,8 +355,8 @@ overridden by the environment variable @w{@env{OCTAVE_VERSION_INITFILE}}. @item @var{config-dir}/octave/octaverc @cindex personal startup file where @code{@var{config-dir}} is the platform-dependent location for user -local configuration files (e.g., @w{@env{$XDG_CONFIG_HOME}} on many Unix-like -operating systems or @w{@env{%APPDATA%}} on Windows). +local configuration files (e.g., @w{@env{$XDG_CONFIG_HOME}}@ on many Unix-like +operating systems or @w{@env{%APPDATA%}}@ on Windows). @item ~/.octaverc @cindex personal startup file diff --git a/doc/interpreter/expr.txi b/doc/interpreter/expr.txi index 900b56c9b5..250c5357ea 100644 --- a/doc/interpreter/expr.txi +++ b/doc/interpreter/expr.txi @@ -261,7 +261,7 @@ data(idx) @noindent Instead of creating the @code{idx} array it is possible to replace -@code{data(idx)} with @w{@code{data( data <= 2 )}} in the above code. +@code{data(idx)} with @w{@code{data( data <= 2 )}}@ in the above code. While the size of the logical index expressions is usually the same as that of the array being indexed, this is not a necessary condition. If the logical @@ -375,7 +375,7 @@ the respective dimension of the array. However, if the number of indexing components exceeds the number of dimensions (@w{@code{M > nd}}) then the excess components must all be singletons (@code{1}). Moreover, if @w{@code{M < nd}}, the behavior is equivalent to -reshaping the input object so as to merge the trailing @w{@code{nd - M}} +reshaping the input object so as to merge the trailing @w{@code{nd - M}}@ dimensions into the last index dimension @code{M}. Thus, the result will have the dimensionality of the index expression, and not the original object. This is the case whenever dimensionality of the index is greater than one diff --git a/doc/interpreter/external.txi b/doc/interpreter/external.txi index 72bb3e1033..5ecd00f61a 100755 --- a/doc/interpreter/external.txi +++ b/doc/interpreter/external.txi @@ -158,8 +158,9 @@ most of the definitions necessary for a C++ oct-file. Note that @file{octave/oct.h} is a C++ header and cannot be directly @code{#include}'ed in a C source file, nor any other language. -Included by @file{oct.h} is a definition for the macro @w{@code{DEFUN_DLD}}@ -which creates a dynamically loaded function. This macro takes four arguments: +Included by @file{oct.h} is a definition for the macro +@w{@code{DEFUN_DLD}}@ which creates a dynamically loaded function. This macro +takes four arguments: @enumerate 1 @item The function name as it will be seen in Octave, diff --git a/doc/interpreter/install.txi b/doc/interpreter/install.txi index 4275e5c91e..817411c2cd 100644 --- a/doc/interpreter/install.txi +++ b/doc/interpreter/install.txi @@ -839,7 +839,7 @@ Octave's 64-bit index support is activated with the configure option You must ensure that all Fortran sources except those in the @file{liboctave/external/ranlib} directory are compiled such that INTEGERS are 8-bytes wide. If you are using gfortran, the configure script should -automatically set the Makefile variable @w{@env{F77_INTEGER_8_FLAG}} to +automatically set the Makefile variable @w{@env{F77_INTEGER_8_FLAG}}@ to @option{-fdefault-integer-8}. If you are using another compiler, you must set this variable yourself. You should NOT set this flag in @env{FFLAGS}, otherwise the files in @file{liboctave/external/ranlib} will be diff --git a/doc/interpreter/oop.txi b/doc/interpreter/oop.txi index 203764af84..e6348f782f 100644 --- a/doc/interpreter/oop.txi +++ b/doc/interpreter/oop.txi @@ -753,8 +753,8 @@ f.polynomial = 1 + 2 * X + 3 * X ^ 2 @end group @end example -Defining the @w{FIRfilter} class as a child of the polynomial class implies -that a @w{FIRfilter} object may be used any place that a polynomial object may +Defining the @w{FIRfilter}@ class as a child of the polynomial class implies +that a @w{FIRfilter}@ object may be used any place that a polynomial object may be used. This is not a normal use of a filter. It may be a more sensible design approach to use aggregation rather than inheritance. In this case, the polynomial is simply a field in the class structure. A class constructor for diff --git a/doc/interpreter/package.txi b/doc/interpreter/package.txi index 4baffe4fe8..70fccfe94f 100644 --- a/doc/interpreter/package.txi +++ b/doc/interpreter/package.txi @@ -245,8 +245,8 @@ autoload ('bar', which ('foo')); @end example @noindent -@xref{PKG_ADD and PKG_DEL Directives}, for details on @w{@code{PKG_ADD}}@ -directives. +@xref{PKG_ADD and PKG_DEL Directives}, for details on +@w{@code{PKG_ADD}}@ directives. @cindex PKG_DEL @anchor{XREFPKG_DEL} @@ -255,8 +255,8 @@ An optional file that includes commands that are run when the package is removed from the users path. Note that @w{@code{PKG_DEL}}@ directives in the source code of the package will also be added to this file by the Octave package manager. -@xref{PKG_ADD and PKG_DEL Directives}, for details on @w{@code{PKG_DEL}}@ -directives. +@xref{PKG_ADD and PKG_DEL Directives}, for details on +@w{@code{PKG_DEL}}@ directives. @item package/pre_install.m This is an optional function that is run prior to the installation of a diff --git a/doc/interpreter/plot.txi b/doc/interpreter/plot.txi index 3cdbb20317..dc16fc8939 100644 --- a/doc/interpreter/plot.txi +++ b/doc/interpreter/plot.txi @@ -817,8 +817,8 @@ numerically @tab Finally, superscripting and subscripting can be controlled with the @qcode{'^'} and @qcode{'_'} characters. If the @qcode{'^'} or @qcode{'_'} is followed by a -@{ character, then all of the block surrounded by the @w{@{ @}} pair is -superscripted or subscripted. Without the @w{@{ @}} pair, only the character +@{ character, then all of the block surrounded by the @w{@{ @}}@ pair is +superscripted or subscripted. Without the @w{@{ @}}@ pair, only the character immediately following the @qcode{'^'} or @qcode{'_'} is changed. @float Table,tab:extended @@ -1065,10 +1065,10 @@ width 0.6pt \tabskip=0pt\cr @cindex Degree Symbol Conformance to both @TeX{} and @sc{matlab} with respect to the @code{\circ} -symbol is impossible. While @TeX{} translates this symbol to @w{Unicode 2218} -(U+2218), @sc{matlab} maps this to @w{Unicode 00B0} (U+00B0) instead. Octave -has chosen to follow the @TeX{} specification, but has added the additional -symbol @code{\deg} which maps to the degree symbol (U+00B0). +symbol is impossible. While @TeX{} translates this symbol to +@w{Unicode 2218}@ (U+2218), @sc{matlab} maps this to @w{Unicode 00B0}@ (U+00B0) +instead. Octave has chosen to follow the @TeX{} specification, but has added +the additional symbol @code{\deg} which maps to the degree symbol (U+00B0). @node "latex" interpreter @subsubsection "latex" interpreter diff --git a/libinterp/corefcn/bitfcns.cc b/libinterp/corefcn/bitfcns.cc index 60316bd43e..baa9157770 100644 --- a/libinterp/corefcn/bitfcns.cc +++ b/libinterp/corefcn/bitfcns.cc @@ -669,8 +669,8 @@ The input is either a string specifying a floating point type, or it is an existing floating point variable @var{var}. The default type is @qcode{"double"}, but @qcode{"single"} is a valid option. -On IEEE 754 compatible systems, @code{flintmax} is @w{@math{2^{53}}} for -@qcode{"double"} and @w{@math{2^{24}}} for @qcode{"single"}. +On IEEE 754 compatible systems, @code{flintmax} is @w{@math{2^{53}}}@ for +@qcode{"double"} and @w{@math{2^{24}}}@ for @qcode{"single"}. Example Code - query an existing variable diff --git a/libinterp/corefcn/chol.cc b/libinterp/corefcn/chol.cc index daa2610add..9f56ac87a2 100644 --- a/libinterp/corefcn/chol.cc +++ b/libinterp/corefcn/chol.cc @@ -807,8 +807,8 @@ original factored matrix. Given a Cholesky@tie{}factorization of a real symmetric or complex Hermitian positive definite matrix @w{@var{A} = @var{R}'*@var{R}}, @var{R}@tie{}upper triangular, return the Cholesky@tie{}factorization of -@var{A1}, where @w{A1(p,p) = A}, @w{A1(:,j) = A1(j,:)' = u} and -@w{p = [1:j-1,j+1:n+1]}. @w{u(j)} should be positive. +@var{A1}, where @w{A1(p,p) = A}, @w{A1(:,j) = A1(j,:)' = u}@ and +@w{p = [1:j-1,j+1:n+1]}. @w{u(j)}@ should be positive. On return, @var{info} is set to @@ -1186,7 +1186,7 @@ original factored matrix. Given a Cholesky@tie{}factorization of a real symmetric or complex Hermitian positive definite matrix @w{@var{A} = @var{R}'*@var{R}}, @var{R}@tie{}upper triangular, return the Cholesky@tie{}factorization of -@w{@var{A}(p,p)}, where @w{p} is the permutation @* +@w{@var{A}(p,p)}, where p is the permutation @* @code{p = [1:i-1, shift(i:j, 1), j+1:n]} if @w{@var{i} < @var{j}} @* or @* @code{p = [1:j-1, shift(j:i,-1), i+1:n]} if @w{@var{j} < @var{i}}. @* diff --git a/libinterp/corefcn/environment.cc b/libinterp/corefcn/environment.cc index 2ec259705c..66ee0aa53b 100644 --- a/libinterp/corefcn/environment.cc +++ b/libinterp/corefcn/environment.cc @@ -164,9 +164,9 @@ DEFMETHOD (EDITOR, interp, args, nargout, @deftypefnx {} {@var{old_val} =} EDITOR (@var{new_val}, "local") Query or set the internal variable that specifies the default text editor. -The default value is taken from the environment variable @w{@env{EDITOR}}@ -when Octave starts. If the environment variable is not initialized, -@w{@env{EDITOR}}@ will be set to @qcode{"emacs"}. +The default value is taken from the environment variable +@w{@env{EDITOR}}@ when Octave starts. If the environment variable is not +initialized, @w{@env{EDITOR}}@ will be set to @qcode{"emacs"}. When called from inside a function with the @qcode{"local"} option, the variable is changed locally for the function and any subroutines it calls. diff --git a/libinterp/corefcn/oct-hist.cc b/libinterp/corefcn/oct-hist.cc index a4765ef7f2..170def0dfe 100644 --- a/libinterp/corefcn/oct-hist.cc +++ b/libinterp/corefcn/oct-hist.cc @@ -826,10 +826,11 @@ All future commands issued during the current Octave session will be written to this new file (if the current setting of @code{history_save} allows for this). The default value is @file{@w{@env{$DATA}}/octave/history}, where -@w{@env{$DATA}} is the platform-specific location for (roaming) user data files -(e.g., @w{@env{$XDG_DATA_HOME}} or, if that is not set, @file{~/.local/share} -on Unix-like operating systems or @w{@env{%APPDATA%}} on Windows). The default -value may be overridden by the environment variable @w{@env{OCTAVE_HISTFILE}}. +@w{@env{$DATA}}@ is the platform-specific location for (roaming) user data files +(e.g., @w{@env{$XDG_DATA_HOME}}@ or, if that is not set, @file{~/.local/share} +on Unix-like operating systems or @w{@env{%APPDATA%}}@ on Windows). The +default value may be overridden by the environment variable +@w{@env{OCTAVE_HISTFILE}}. Programming Notes: diff --git a/libinterp/corefcn/qr.cc b/libinterp/corefcn/qr.cc index 17586d52c4..b06f48c5b1 100644 --- a/libinterp/corefcn/qr.cc +++ b/libinterp/corefcn/qr.cc @@ -1470,7 +1470,7 @@ vector to be inserted into @var{A} (if @var{orient} is @qcode{"row"}). The default value of @var{orient} is @qcode{"col"}. If @var{orient} is @qcode{"col"}, @var{u} may be a matrix and @var{j} an index vector resulting in the QR@tie{}factorization of a matrix @var{B} such that -@w{B(:,@var{j})} gives @var{u} and @w{B(:,@var{j}) = []} gives @var{A}. +@w{B(:,@var{j})}@ gives @var{u} and @w{B(:,@var{j}) = []}@ gives @var{A}. Notice that the latter case is done as a sequence of k insertions; thus, for k large enough, it will be both faster and more accurate to recompute the factorization from scratch. @@ -1677,7 +1677,7 @@ The default value of @var{orient} is @qcode{"col"}. If @var{orient} is @qcode{"col"}, @var{j} may be an index vector resulting in the QR@tie{}factorization of a matrix @var{B} such that -@w{A(:,@var{j}) = []} gives @var{B}. Notice that the latter case is done as +@w{A(:,@var{j}) = []}@ gives @var{B}. Notice that the latter case is done as a sequence of k deletions; thus, for k large enough, it will be both faster and more accurate to recompute the factorization from scratch. diff --git a/scripts/help/__unimplemented__.m b/scripts/help/__unimplemented__.m index b12d040b63..3bb262dc0e 100644 --- a/scripts/help/__unimplemented__.m +++ b/scripts/help/__unimplemented__.m @@ -587,7 +587,7 @@ case "not loaded", txt = sprintf (["%s which you have installed, but not loaded. ", ... - "To load the package, type @w{@code{pkg load %s}} ", ... + "To load the package, type @w{@code{pkg load %s}}@ ", ... "from the Octave prompt."], txt, name); otherwise diff --git a/scripts/help/bessel.m b/scripts/help/bessel.m index f96c29c220..d694b06546 100644 --- a/scripts/help/bessel.m +++ b/scripts/help/bessel.m @@ -54,8 +54,8 @@ ## @item besselh ## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k} = 2) ## kind. If the argument @var{opt} is supplied, the result is multiplied by -## @w{@code{exp (-I*@var{x})}}@ for @var{k} = 1 or @w{@code{exp (I*@var{x})}}@ -## for @var{k} = 2. +## @w{@code{exp (-I*@var{x})}}@ for @var{k} = 1 or +## @w{@code{exp (I*@var{x})}}@ for @var{k} = 2. ## @end table ## ## If @var{alpha} is a scalar, the result is the same size as @var{x}. If diff --git a/scripts/io/csvwrite.m b/scripts/io/csvwrite.m index 964fd78f88..bea4b497ab 100644 --- a/scripts/io/csvwrite.m +++ b/scripts/io/csvwrite.m @@ -27,7 +27,7 @@ ## @deftypefn {} {} csvwrite (@var{filename}, @var{x}) ## @deftypefnx {} {} csvwrite (@var{filename}, @var{x}, @var{dlm_opt1}, @dots{}) ## Write the numeric matrix @var{x} to the file @var{filename} in -## @w{comma-separated-value} (CSV) format. +## @w{comma-separated-value}@ (CSV) format. ## ## This function is equivalent to ## diff --git a/scripts/linear-algebra/linsolve.m b/scripts/linear-algebra/linsolve.m index 2d3530a28c..1f70d57a9b 100644 --- a/scripts/linear-algebra/linsolve.m +++ b/scripts/linear-algebra/linsolve.m @@ -30,7 +30,7 @@ ## Solve the linear system @code{A*x = b}. ## ## With no options, this function is equivalent to the left division operator -## @w{(@code{x = A \ b})} or the matrix-left-divide function +## @w{(@code{x = A \ b})}@ or the matrix-left-divide function ## @w{(@code{x = mldivide (A, b)})}. ## ## Octave ordinarily examines the properties of the matrix @var{A} and chooses diff --git a/scripts/plot/appearance/view.m b/scripts/plot/appearance/view.m index f9c055392b..df5359fd75 100644 --- a/scripts/plot/appearance/view.m +++ b/scripts/plot/appearance/view.m @@ -37,11 +37,13 @@ ## arguments or as 2-element vector. The viewpoint can also be specified with ## Cartesian coordinates @var{x}, @var{y}, and @var{z}. ## -## The call @code{view (2)} sets the viewpoint to @w{@var{azimuth} = 0}@ -## and @w{@var{elevation} = 90}, which is the default for 2-D graphs. +## The call @code{view (2)} sets the viewpoint to +## @w{@var{azimuth} = 0}@ and @w{@var{elevation} = 90}, which is the default +## for 2-D graphs. ## -## The call @code{view (3)} sets the viewpoint to @w{@var{azimuth} = -37.5}@ -## and @w{@var{elevation} = 30}, which is the default for 3-D graphs. +## The call @code{view (3)} sets the viewpoint to +## @w{@var{azimuth} = -37.5}@ and @w{@var{elevation} = 30}, which is the +## default for 3-D graphs. ## ## If the first argument @var{hax} is an axes handle, then operate on ## this axes rather than the current axes returned by @code{gca}. diff --git a/scripts/plot/util/groot.m b/scripts/plot/util/groot.m index 1a142c743e..167ed696c9 100644 --- a/scripts/plot/util/groot.m +++ b/scripts/plot/util/groot.m @@ -30,8 +30,8 @@ ## The root graphics object is the ultimate parent of all graphics objects. ## ## In addition, the root object contains information about the graphics -## system as a whole such as the @code{ScreenSize}. Use @w{@code{get (groot)}} -## to find out what information is available. +## system as a whole such as the @code{ScreenSize}. Use +## @w{@code{get (groot)}}@ to find out what information is available. ## ## Defaults for the graphic system as a whole are specified by setting ## properties of the root graphics object that begin with @qcode{"Default"}. diff --git a/scripts/signal/movfun.m b/scripts/signal/movfun.m index f138cb2583..a3d07717ff 100644 --- a/scripts/signal/movfun.m +++ b/scripts/signal/movfun.m @@ -33,14 +33,14 @@ ## ## If @var{wlen} is a scalar, the function @var{fcn} is applied to a moving ## window of length @var{wlen}. When @var{wlen} is an odd number the window is -## symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on either +## symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements on either ## side of the central element. For example, when calculating the output at ## index 5 with a window length of 3, @code{movfun} uses data elements ## @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window is -## asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movfun} uses data elements +## asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movfun} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -57,11 +57,11 @@ ## computation along dimension 1, i.e., down the columns of the array. ## ## When applied to an array (possibly multi-dimensional) with @var{n} columns, -## @var{fcn} may return a result in either of two formats: @w{Format 1)} -## an array of size 1-by-@var{n}-by-@var{dim3}-by-@dots{}-by-@var{dimN}. This +## @var{fcn} may return a result in either of two formats: @w{Format 1)}@ an +## array of size 1-by-@var{n}-by-@var{dim3}-by-@dots{}-by-@var{dimN}. This ## is the typical output format from Octave core functions. Type ## @code{demo ("movfun", 5)} for an example of this use case. -## @w{Format 2)} a row vector of length +## @w{Format 2)}@ a row vector of length ## @code{@var{n} * @var{numel_higher_dims}} where @var{numel_higher_dims} is ## @w{@code{prod (size (@var{x})(3:end))}}. The output of @var{fcn} for the ## i-th input column must be found in the output at indices diff --git a/scripts/sparse/bicg.m b/scripts/sparse/bicg.m index d0467c6b55..570deacfb7 100644 --- a/scripts/sparse/bicg.m +++ b/scripts/sparse/bicg.m @@ -34,8 +34,9 @@ ## @deftypefnx {} {@var{x} =} bicg (@var{A}, @var{b}, @var{tol}, @var{maxit}, @var{M}, [], @var{x0}, @dots{}) ## @deftypefnx {} {@var{x} =} bicg (@var{A}, @var{b}, @var{tol}, @var{maxit}, @var{M1}, @var{M2}, @var{x0}, @dots{}) ## @deftypefnx {} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}] =} bicg (@var{A}, @var{b}, @dots{}) -## Solve the linear system of equations @w{@code{@var{A} * @var{x} = @var{b}}}@ -## by means of the Bi-Conjugate Gradient iterative method. +## Solve the linear system of equations +## @w{@code{@var{A} * @var{x} = @var{b}}}@ by means of the Bi-Conjugate +## Gradient iterative method. ## ## The input arguments are: ## @@ -65,8 +66,9 @@ ## @var{M1}, @var{M2} are the preconditioners. The preconditioner @var{M} is ## given as @code{@var{M} = @var{M1} * @var{M2}}. Both @var{M1} and @var{M2} ## can be passed as a matrix or as a function handle or inline function -## @code{g} such that @w{@code{g (@var{x}, "notransp") = @var{M1} \ @var{x}}}@ -## or @w{@code{g (@var{x}, "notransp") = @var{M2} \ @var{x}}}@ and +## @code{g} such that +## @w{@code{g (@var{x}, "notransp") = @var{M1} \ @var{x}}}@ or +## @w{@code{g (@var{x}, "notransp") = @var{M2} \ @var{x}}}@ and ## @w{@code{g (@var{x}, "transp") = @var{M1}' \ @var{x}}}@ or ## @w{@code{g (@var{x}, "transp") = @var{M2}' \ @var{x}}}. ## If @var{M1} is omitted or empty, then preconditioning is not applied. diff --git a/scripts/sparse/pcg.m b/scripts/sparse/pcg.m index 435745d418..0271cbafcf 100644 --- a/scripts/sparse/pcg.m +++ b/scripts/sparse/pcg.m @@ -28,8 +28,9 @@ ## @deftypefnx {} {@var{x} =} pcg (@var{A}, @var{b}, @var{tol}, @var{maxit}, @var{M}, [], @var{x0}, @dots{}) ## @deftypefnx {} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}, @var{eigest}] =} pcg (@var{A}, @var{b}, @dots{}) ## -## Solve the linear system of equations @w{@code{@var{A} * @var{x} = @var{b}}}@ -## by means of the Preconditioned Conjugate Gradient iterative method. +## Solve the linear system of equations +## @w{@code{@var{A} * @var{x} = @var{b}}}@ by means of the Preconditioned +## Conjugate Gradient iterative method. ## ## The input arguments are: ## diff --git a/scripts/statistics/corr.m b/scripts/statistics/corr.m index f2c08c2a06..8d578a77da 100644 --- a/scripts/statistics/corr.m +++ b/scripts/statistics/corr.m @@ -29,7 +29,7 @@ ## Compute matrix of correlation coefficients. ## ## If each row of @var{x} and @var{y} is an observation and each column is -## a variable, then the @w{(@var{i}, @var{j})-th} entry of +## a variable, then the @w{(@var{i}, @var{j})-th}@ entry of ## @code{corr (@var{x}, @var{y})} is the correlation between the ## @var{i}-th variable in @var{x} and the @var{j}-th variable in @var{y}. ## @var{x} and @var{y} must have the same number of rows (observations). diff --git a/scripts/statistics/cov.m b/scripts/statistics/cov.m index facc3eaebe..9de75da387 100644 --- a/scripts/statistics/cov.m +++ b/scripts/statistics/cov.m @@ -52,7 +52,7 @@ ## If called with one argument, compute @code{cov (@var{x}, @var{x})}. If ## @var{x} is a vector, this is the scalar variance of @var{x}. If @var{x} is ## a matrix, each row of @var{x} is treated as an observation, and each column -## as a variable, and the @w{(@var{i}, @var{j})-th} entry of +## as a variable, and the @w{(@var{i}, @var{j})-th}@ entry of ## @code{cov (@var{x})} is the covariance between the @var{i}-th and ## @var{j}-th columns in @var{x}. If @var{x} has dimensions n x m, the output ## @var{c} will be a m x m square covariance matrix. diff --git a/scripts/statistics/kurtosis.m b/scripts/statistics/kurtosis.m index 60332661d0..40109242b0 100644 --- a/scripts/statistics/kurtosis.m +++ b/scripts/statistics/kurtosis.m @@ -54,7 +54,7 @@ ## The optional argument @var{flag} controls which normalization is used. ## If @var{flag} is equal to 1 (default value, used when @var{flag} is omitted ## or empty), return the sample kurtosis as defined above. If @var{flag} is -## equal to 0, return the @w{"bias-corrected"} kurtosis coefficient instead: +## equal to 0, return the @w{"bias-corrected"}@ kurtosis coefficient instead: ## @tex ## $$ ## \kappa_0 = 3 + {\scriptstyle N - 1 \over \scriptstyle (N - 2)(N - 3)} \, diff --git a/scripts/statistics/movmad.m b/scripts/statistics/movmad.m index 40a2981d32..e095b8432e 100644 --- a/scripts/statistics/movmad.m +++ b/scripts/statistics/movmad.m @@ -34,14 +34,14 @@ ## ## If @var{wlen} is a scalar, the function @code{mad} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## oneither side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movmad} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movmad} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## thecentral element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movmad} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -82,8 +82,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/statistics/movmax.m b/scripts/statistics/movmax.m index 40a7f9f879..5c0d288601 100644 --- a/scripts/statistics/movmax.m +++ b/scripts/statistics/movmax.m @@ -34,14 +34,14 @@ ## ## If @var{wlen} is a scalar, the function @code{max} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## on either side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movmax} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movmax} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movmax} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -82,8 +82,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/statistics/movmean.m b/scripts/statistics/movmean.m index 329e9b9672..d4220713b0 100644 --- a/scripts/statistics/movmean.m +++ b/scripts/statistics/movmean.m @@ -34,14 +34,14 @@ ## ## If @var{wlen} is a scalar, the function @code{mean} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## on either side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movmean} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movmean} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movmean} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -82,8 +82,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/statistics/movmedian.m b/scripts/statistics/movmedian.m index 99204602d2..a8dfa6670d 100644 --- a/scripts/statistics/movmedian.m +++ b/scripts/statistics/movmedian.m @@ -34,14 +34,14 @@ ## ## If @var{wlen} is a scalar, the function @code{movmedian} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## on either side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movmedian} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movmedian} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movmedian} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -82,8 +82,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/statistics/movmin.m b/scripts/statistics/movmin.m index cae9b10267..9804b3ff5f 100644 --- a/scripts/statistics/movmin.m +++ b/scripts/statistics/movmin.m @@ -34,14 +34,14 @@ ## ## If @var{wlen} is a scalar, the function @code{min} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## on either side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movmin} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movmin} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movmin} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -82,8 +82,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/statistics/movprod.m b/scripts/statistics/movprod.m index b429d6f97a..8a913c9c0f 100644 --- a/scripts/statistics/movprod.m +++ b/scripts/statistics/movprod.m @@ -34,14 +34,14 @@ ## ## If @var{wlen} is a scalar, the function @code{movprod} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## on either side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movprod} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movprod} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movprod} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -82,8 +82,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/statistics/movstd.m b/scripts/statistics/movstd.m index cf9e2fa52a..758dbedaeb 100644 --- a/scripts/statistics/movstd.m +++ b/scripts/statistics/movstd.m @@ -35,14 +35,14 @@ ## ## If @var{wlen} is a scalar, the function @code{movstd} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## on either side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movstd} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movstd} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movstd} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -99,8 +99,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/statistics/movsum.m b/scripts/statistics/movsum.m index e9492a2fac..6a10ae5380 100644 --- a/scripts/statistics/movsum.m +++ b/scripts/statistics/movsum.m @@ -34,14 +34,14 @@ ## ## If @var{wlen} is a scalar, the function @code{movsum} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## on either side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movsum} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movsum} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movsum} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -82,8 +82,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} diff --git a/scripts/statistics/movvar.m b/scripts/statistics/movvar.m index b2ddd9a207..5c9c3c5d0e 100644 --- a/scripts/statistics/movvar.m +++ b/scripts/statistics/movvar.m @@ -35,14 +35,14 @@ ## ## If @var{wlen} is a scalar, the function @code{var} is applied to a ## moving window of length @var{wlen}. When @var{wlen} is an odd number the -## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on -## either side of the central element. For example, when calculating the +## window is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}}@ elements +## on either side of the central element. For example, when calculating the ## output at index 5 with a window length of 3, @code{movvar} uses data ## elements @w{@code{[4, 5, 6]}}. If @var{wlen} is an even number, the window -## is asymmetric and has @w{@code{@var{wlen}/2}} elements to the left of the -## central element and @w{@code{@var{wlen}/2 - 1}} elements to the right of the -## central element. For example, when calculating the output at index 5 with a -## window length of 4, @code{movvar} uses data elements +## is asymmetric and has @w{@code{@var{wlen}/2}}@ elements to the left of the +## central element and @w{@code{@var{wlen}/2 - 1}}@ elements to the right of +## the central element. For example, when calculating the output at index 5 +## with a window length of 4, @code{movvar} uses data elements ## @w{@code{[3, 4, 5, 6]}}. ## ## If @var{wlen} is an array with two elements @w{@code{[@var{nb}, @var{na}]}}, @@ -98,8 +98,8 @@ ## data array are deleted. For example, with a 10-element data vector and a ## window of length 3, the output will contain only 8 elements. The first ## element would require calculating the function over indices -## @w{@code{[0, 1, 2]}} and is therefore discarded. The last element would -## require calculating the function over indices @w{@code{[9, 10, 11]}} and is +## @w{@code{[0, 1, 2]}}@ and is therefore discarded. The last element would +## require calculating the function over indices @w{@code{[9, 10, 11]}}@ and is ## therefore discarded. ## ## @item @qcode{"fill"} From 9ac06ca23dc618e399db851fa6e2e3c59c94f9b7 Mon Sep 17 00:00:00 2001 From: Rik Date: Sat, 23 Nov 2024 13:22:36 -0800 Subject: [PATCH 5/8] doc: Eliminate double period at end of "mode" graphics property documentation. * genpropdoc.m: Use bare "__modemsg__" rather than "__modemsg__." since the expansion of the macro already includes a period. --- doc/interpreter/genpropdoc.m | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/interpreter/genpropdoc.m b/doc/interpreter/genpropdoc.m index dee0ec602e..1d938af695 100644 --- a/doc/interpreter/genpropdoc.m +++ b/doc/interpreter/genpropdoc.m @@ -580,7 +580,7 @@ position and size of the figure (in @code{paperunits} units) on the printed \ figure on the page, and the size is defined by @code{[width height]}. For \ output formats not implicitly rendered on paper, @code{width} and \ @code{height} define the size of the image and the position information is \ -ignored. __modemsg__."; +ignored. __modemsg__"; s.valid = valid_4elvec; s.category = "Printing/Saving"; @@ -649,7 +649,7 @@ element defines a pixel with the element (1,1) representing the \ case "renderer" s.doc = "Rendering engine used for printing when @code{renderermode} \ -is @qcode{\"manual\"}. __modemsg__."; +is @qcode{\"manual\"}. __modemsg__"; s.category = "Printing/Saving"; case "renderermode" @@ -823,7 +823,7 @@ element defines a pixel with the element (1,1) representing the \ case "cameraposition" s.doc = "Coordinates of the camera position viewing the \ -__objname__. __modemsg__."; +__objname__. __modemsg__"; s.valid = valid_3elvec; s.category = "Camera and View Controls"; @@ -836,7 +836,7 @@ element defines a pixel with the element (1,1) representing the \ case "cameratarget" s.doc = "Coordinates of the point at which the viewing camera is \ -aimed. __modemsg__."; +aimed. __modemsg__"; s.valid = valid_3elvec; s.category = "Camera and View Controls"; @@ -850,7 +850,7 @@ element defines a pixel with the element (1,1) representing the \ case "cameraupvector" s.doc = "A 3-element vector defining the upward direction of the \ current view. Note that the default is [0 1 0] for 2-D plots and [0 0 1] for \ -3-D plots. __modemsg__."; +3-D plots. __modemsg__"; s.valid = valid_3elvec; s.category = "Camera and View Controls"; @@ -863,7 +863,7 @@ element defines a pixel with the element (1,1) representing the \ case "cameraviewangle" s.doc = "The camera's field of view defined as an angle between 0 \ -and 180 degrees. __modemsg__."; +and 180 degrees. __modemsg__"; s.valid = "scalar"; s.category = "Camera and View Controls"; @@ -877,7 +877,7 @@ element defines a pixel with the element (1,1) representing the \ case "clim" s.doc = "Define limits for the color axis of __objname__ \ children that have the @qcode{cdata} property. \ -__modemsg__."; +__modemsg__"; s.valid = valid_2elvec; s.category = "Color and Transparency"; @@ -942,7 +942,7 @@ element defines a pixel with the element (1,1) representing the \ displayed in the axes. Setting @code{dataaspectratio} to \ @w{@code{[1, 2]}} causes the length of one unit as displayed on the x-axis \ to be the same as the length of 2 units on the y-axis. \ -@xref{XREFdaspect, , daspect function}. __modemsg__."; +@xref{XREFdaspect, , daspect function}. __modemsg__"; s.valid = valid_3elvec; s.category = "Axes Box Appearance"; @@ -964,7 +964,7 @@ element defines a pixel with the element (1,1) representing the \ s.category = "Text Appearance"; case "fontsize" - s.doc = [doc_fontsize, " __modemsg__."]; + s.doc = [doc_fontsize, " __modemsg__"]; s.valid = "scalar"; s.category = "Text Appearance"; @@ -997,7 +997,7 @@ element defines a pixel with the element (1,1) representing the \ case "gridcolor" s.doc = "Color of the major grid lines. \ -@xref{Colors, , colorspec}. __modemsg__."; +@xref{Colors, , colorspec}. __modemsg__"; s.valid = packopt ({markdef(valid_color), "@qcode{\"none\"}"}); s.category = "Axes Grid Appearance"; @@ -1070,7 +1070,7 @@ element defines a pixel with the element (1,1) representing the \ case "minorgridcolor" s.doc = "Color of the minor grid lines. \ -@xref{Colors, , colorspec}. __modemsg__."; +@xref{Colors, , colorspec}. __modemsg__"; s.valid = packopt ({markdef(valid_color), "@qcode{\"none\"}"}); s.category = "Axes Grid Appearance"; @@ -1119,7 +1119,7 @@ element defines a pixel with the element (1,1) representing the \ s.category = "Object Position"; case "plotboxaspectratio" - s.doc = "@xref{XREFpbaspect, , pbaspect function}. __modemsg__."; + s.doc = "@xref{XREFpbaspect, , pbaspect function}. __modemsg__"; s.category = "Object Position"; case "plotboxaspectratiomode" @@ -1172,7 +1172,7 @@ element defines a pixel with the element (1,1) representing the \ s.doc = "Control whether axes tick marks project @qcode{\"in\"} to \ the plot box or @qcode{\"out\"}. The value @qcode{\"both\"} will draw tick \ marks both in and out. The value @qcode{\"none\"} means no tick marks will \ -be drawn, although tick labels will still be rendered. __modemsg__. Note \ +be drawn, although tick labels will still be rendered. __modemsg__ Note \ that the default is @qcode{\"in\"} for 2-D and @qcode{\"out\"} for 3-D \ plots."; s.category = "Axes Box Appearance"; @@ -1246,7 +1246,7 @@ element defines a pixel with the element (1,1) representing the \ case "xcolor" s.doc = "Color of the x-axis. @xref{Colors, , colorspec}. \ -__modemsg__."; +__modemsg__"; s.valid = packopt ({markdef(valid_color), "@qcode{\"none\"}"}); s.category = "Axes Box Appearance"; @@ -1276,7 +1276,7 @@ element defines a pixel with the element (1,1) representing the \ case "xlim" s.doc = "Two-element vector @code{[xmin xmax]} specifying the limits \ -for the x-axis. __modemsg__. @xref{XREFxlim, , @w{xlim function}}."; +for the x-axis. __modemsg__ @xref{XREFxlim, , @w{xlim function}}."; s.valid = valid_2elvec; s.category = "Axes Box Appearance"; @@ -1310,13 +1310,13 @@ element defines a pixel with the element (1,1) representing the \ s.category = "Axes Grid Appearance"; case "xtick" - s.doc = "Position of x tick marks. __modemsg__."; + s.doc = "Position of x tick marks. __modemsg__"; s.valid = "vector"; s.printdefault = false; s.category = "Axes Box Appearance"; case "xticklabel" - s.doc = "Labels of x tick marks. __modemsg__."; + s.doc = "Labels of x tick marks. __modemsg__"; s.valid = valid_cellstring; s.category = "Text Appearance"; @@ -1375,7 +1375,7 @@ element defines a pixel with the element (1,1) representing the \ case "ylim" s.doc = "Two-element vector @code{[ymin ymax]} specifying the limits \ -for the y-axis. __modemsg__. @xref{XREFylim, , @w{ylim function}}."; +for the y-axis. __modemsg__ @xref{XREFylim, , @w{ylim function}}."; s.valid = valid_2elvec; s.category = "Axes Box Appearance"; @@ -1409,13 +1409,13 @@ element defines a pixel with the element (1,1) representing the \ s.category = "Axes Grid Appearance"; case "ytick" - s.doc = "Position of y tick marks. __modemsg__."; + s.doc = "Position of y tick marks. __modemsg__"; s.valid = "vector"; s.printdefault = false; s.category = "Axes Box Appearance"; case "yticklabel" - s.doc = "Labels of y tick marks. __modemsg__."; + s.doc = "Labels of y tick marks. __modemsg__"; s.valid = valid_cellstring; s.category = "Text Appearance"; @@ -1470,7 +1470,7 @@ element defines a pixel with the element (1,1) representing the \ case "zlim" s.doc = "Two-element vector @code{[zmin zmax]} specifying the limits \ -for the z-axis. __modemsg__. @xref{XREFzlim, , @w{zlim function}}."; +for the z-axis. __modemsg__ @xref{XREFzlim, , @w{zlim function}}."; s.valid = valid_2elvec; s.category = "Axes Box Appearance"; @@ -1504,13 +1504,13 @@ element defines a pixel with the element (1,1) representing the \ s.category = "Axes Grid Appearance"; case "ztick" - s.doc = "Position of z tick marks. __modemsg__."; + s.doc = "Position of z tick marks. __modemsg__"; s.valid = "vector"; s.printdefault = false; s.category = "Axes Box Appearance"; case "zticklabel" - s.doc = "Labels of z tick marks. __modemsg__."; + s.doc = "Labels of z tick marks. __modemsg__"; s.valid = valid_cellstring; s.category = "Text Appearance"; @@ -1596,7 +1596,7 @@ automatically when objects are added to (or deleted from) the peer axes.\n\ legend (\"numcolumns\", 3);\n\ @end group\n\ @end example\n\ -__modemsg__."; +__modemsg__"; s.valid = "scalar integer"; s.category = "Layout"; From d1edd0bde3a461533552b859f5240243afaee526 Mon Sep 17 00:00:00 2001 From: Rik Date: Mon, 25 Nov 2024 13:11:41 -0800 Subject: [PATCH 6/8] Fix makeinfo errors for comment block keywords (bug #66428) * __makeinfo__.m: Change regexp pattern to find text within @seealso macro so that it ignores escaped curly brace '\}'. Change regexprep pattern so that '@' is escaped to '@@' unless '@\' escape pattern is used. --- scripts/help/__makeinfo__.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/help/__makeinfo__.m b/scripts/help/__makeinfo__.m index 675c447115..a6ba6a7e00 100644 --- a/scripts/help/__makeinfo__.m +++ b/scripts/help/__makeinfo__.m @@ -101,11 +101,12 @@ endif ## Texinfo crashes if @end tex does not appear first on the line. text = regexprep (text, '^ +@end tex', '@end tex', 'lineanchors'); - ## Replace @seealso with Octave specific @xseealso macro, and escape '@' - [s, e] = regexp (text, '@seealso{[^}]*}'); + ## Replace @seealso with Octave specific @xseealso macro. + ## Also escape '@' to '@@' for Texinfo, unless '@\' pattern used. + [s, e] = regexp (text, '@seealso{(?:.|\\})*}'); cum_rep = 0; for (i_match = 1:numel (s)) - esc_text = strrep (text(((s(i_match)+8:e(i_match))+i_match-1)+cum_rep), '@', '@@'); + esc_text = regexprep (text(((s(i_match)+8:e(i_match))+i_match-1)+cum_rep), '@(?!\\)', '@@'); text = [text(1:s(i_match)+i_match+cum_rep-1), 'xseealso', esc_text, ... text(e(i_match)+1+i_match+cum_rep-1:end)]; cum_rep += numel (esc_text) - (e(i_match)-(s(i_match)+8)+1); @@ -113,9 +114,9 @@ ## We don't want *ref macros to clutter plain text output with "Note ..." if (strcmp (output_type, "plain text")) - text = regexprep (text, '@ref{(?:[^}]*?),?(?:XREF)?([^,}]+)}', '$1'); - text = regexprep (text, '@xref{(?:[^}]*?),?(?:XREF)?([^,}]+)}', 'See $1'); - text = regexprep (text, '@pxref{(?:[^}]*?),?(?:XREF)?([^,}]+)}', 'see $1'); + text = regexprep (text, '@ref{(?:[^}]*?),?(?:XREF)?([^,}]+)}', '$1'); + text = regexprep (text, '@xref{(?:[^}]*?),?(?:XREF)?([^,}]+)}', 'See $1'); + text = regexprep (text, '@pxref{(?:[^}]*?),?(?:XREF)?([^,}]+)}', 'see $1'); endif file = texi_macros_file (); From aa05d8ad0713041fe27239c29a77aeba518e3a29 Mon Sep 17 00:00:00 2001 From: Rik Date: Mon, 25 Nov 2024 13:42:35 -0800 Subject: [PATCH 7/8] Emit shorter, clearer message when sourcing an m-file fails (bug #62928) * pt-eval.cc: If parsing of sourced file fails, and error message is set, display the existing error message rather than adding on text about how the file could not be parsed. --- libinterp/parse-tree/pt-eval.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libinterp/parse-tree/pt-eval.cc b/libinterp/parse-tree/pt-eval.cc index f8e099a415..6da9962f0d 100644 --- a/libinterp/parse-tree/pt-eval.cc +++ b/libinterp/parse-tree/pt-eval.cc @@ -2189,8 +2189,7 @@ tree_evaluator::source_file (const std::string& file_name, error (ee, "source: error sourcing file '%s'", file_full_name.c_str ()); else - error (ee, "source: error sourcing file '%s': %s", - file_full_name.c_str (), error_message.c_str ()); + error (ee, "%s", error_message.c_str ()); } } From cf4f5f8a6307a13e9858ca981c394b876f83aecb Mon Sep 17 00:00:00 2001 From: Rik Date: Mon, 25 Nov 2024 16:42:27 -0800 Subject: [PATCH 8/8] hdl2struct.m: Fix missing legend markers (bug #65904) * hdl2struct.m: When processing "legend" axes objects, specifically add hidden children with "markertruesize" property to list of children to save. --- scripts/plot/util/hdl2struct.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/plot/util/hdl2struct.m b/scripts/plot/util/hdl2struct.m index 9e6e20b055..78e8898d47 100644 --- a/scripts/plot/util/hdl2struct.m +++ b/scripts/plot/util/hdl2struct.m @@ -62,6 +62,11 @@ ## Check for polar plots with special "polar_grid" object ## FIXME: A hack to fix bug #62093. kids = [kids; findall(h, "tag", "polar_grid")]; + + ## Add legend markers which are normally hidden + if (strcmp (s.properties.tag, "legend")) + kids = [kids; findall(h, "-depth", 1, "type", "line", "-property", "markertruesize")]; + endif endif nkids = length (kids);