Mercurial > octave
changeset 33058:b6e06eb437ab stable
doc: Place major Texinfo @commands on their own line.
Texinfo parser is primitive and most major commands should
appear on their own line with '@' in column 1.
* expr.txi, grammar.txi: Move @subheading commands to their own line.
* func.txi: Remove newline between @section and @anchor
directive.
* genpropdoc.m: Change code to print a newline after @anchor directive
so that @subheading appears on its own line following @anchor.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 20 Feb 2024 10:45:09 -0800 |
parents | 4cb17bd82cd1 |
children | 7ca23b98c04f a0c81947757b |
files | doc/interpreter/expr.txi doc/interpreter/func.txi doc/interpreter/genpropdoc.m doc/interpreter/grammar.txi |
diffstat | 4 files changed, 21 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/expr.txi Tue Feb 20 10:12:45 2024 -0800 +++ b/doc/interpreter/expr.txi Tue Feb 20 10:45:09 2024 -0800 @@ -56,7 +56,8 @@ @ref{XREFLinearIndexing,,Linear Indexing}, and @ref{XREFLogicalIndexing,,Logical Indexing}. -@anchor{XREFComponentIndexing} @subheading Component Indexing +@anchor{XREFComponentIndexing} +@subheading Component Indexing @cindex Component Indexing Component indices may be scalars, vectors, ranges, or the special operator @samp{:}, which selects entire rows, columns, or higher-dimensional slices. @@ -217,7 +218,8 @@ For more information see the @ref{XREFend, , @qcode{"end" keyword}}. -@anchor{XREFLinearIndexing}@subheading Linear Indexing +@anchor{XREFLinearIndexing} +@subheading Linear Indexing @cindex Linear Indexing It is permissible to use a 1-D index with a multi-dimensional object. This is also called @dfn{linear indexing}. In this case, the elements of the @@ -236,7 +238,8 @@ @end group @end example -@anchor{XREFLogicalIndexing}@subheading Logical Indexing +@anchor{XREFLogicalIndexing} +@subheading Logical Indexing @cindex Logical Indexing Logical values can also be used to index matrices and cell arrays. When indexing with a logical array the result will be a vector containing
--- a/doc/interpreter/func.txi Tue Feb 20 10:12:45 2024 -0800 +++ b/doc/interpreter/func.txi Tue Feb 20 10:45:09 2024 -0800 @@ -433,7 +433,6 @@ @section Variable-length Return Lists @cindex variable-length return lists @cindex @code{varargout} - @anchor{XREFvarargout} It is possible to return a variable number of output arguments from a @@ -478,7 +477,6 @@ @section Variable-length Argument Lists @cindex variable-length argument lists @cindex @code{varargin} - @anchor{XREFvarargin} Sometimes the number of input arguments is not known when the function
--- a/doc/interpreter/genpropdoc.m Tue Feb 20 10:12:45 2024 -0800 +++ b/doc/interpreter/genpropdoc.m Tue Feb 20 10:45:09 2024 -0800 @@ -3538,7 +3538,7 @@ for ii = 1:numel (categories) fields = sort (allfields(strcmp (allcategories, categories{ii}))); nf = numel (fields); - str = sprintf ("%s\n\n@anchor{XREF%scategory%s}", str, ... + str = sprintf ("%s\n\n@anchor{XREF%scategory%s}\n", str, ... objname, strrep (categories{ii}, " ", "")); str = sprintf ("%s@subsubheading %s\n", str, categories{ii}); str = sprintf ("%s@prindex %s %s\n", str, ...
--- a/doc/interpreter/grammar.txi Tue Feb 20 10:12:45 2024 -0800 +++ b/doc/interpreter/grammar.txi Tue Feb 20 10:45:09 2024 -0800 @@ -91,19 +91,22 @@ @ref{XREFunwind_protect_cleanup,,unwind_protect_cleanup}@: | @ref{XREFwhile,,while}@: -@anchor{XREFkwcategoryUtilityFunctions}@subheading Utility Functions: +@anchor{XREFkwcategoryUtilityFunctions} +@subheading Utility Functions: The function @code{iskeyword} can be used to quickly check whether an identifier is reserved by Octave. @DOCSTRING(iskeyword) -@anchor{XREFkwcategoryVariableDeclaration}@subheading Variable Declaration: +@anchor{XREFkwcategoryVariableDeclaration} +@subheading Variable Declaration: @DOCSTRING(global) @DOCSTRING(persistent) -@anchor{XREFkwcategoryFunctionDefinition}@subheading Function Definition: +@anchor{XREFkwcategoryFunctionDefinition} +@subheading Function Definition: @DOCSTRING(function) @@ -113,7 +116,8 @@ @DOCSTRING(return) -@anchor{XREFkwcategoryControlStructures}@subheading Control Statements: +@anchor{XREFkwcategoryControlStructures} +@subheading Control Statements: @DOCSTRING(if) @@ -143,7 +147,8 @@ @DOCSTRING(end_unwind_protect) -@anchor{XREFkwcategoryIteratingStructures}@subheading Iterating Structures: +@anchor{XREFkwcategoryIteratingStructures} +@subheading Iterating Structures: @DOCSTRING(for) @@ -165,7 +170,8 @@ @DOCSTRING(continue) -@anchor{XREFkwcategoryClassdefStructures}@subheading Classdef Structures: +@anchor{XREFkwcategoryClassdefStructures} +@subheading Classdef Structures: @DOCSTRING(classdef) @@ -211,7 +217,8 @@ @DOCSTRING(endenumeration) -@anchor{XREFkwcategoryExecutionEnvironment}@subheading Execution Environment: +@anchor{XREFkwcategoryExecutionEnvironment} +@subheading Execution Environment: @DOCSTRING(__FILE__)