changeset 20136:e51473fdb622

doc: Periodic grammarcheck of documentation. * func.txi, io.txi, error.cc, file-io.cc, regexp.cc, utils.cc, variables.cc, dlmwrite.m, strread.m, textread.m, textscan.m: Use @xbackslashchar to produce a backslash and resolve differences between Info viewer and pdf view. * warning_ids.m: Use @option around command line options. * qmr.m: Use @nospell macro for names in citation. * genpropdoc.m: Eliminate trailing space to closing '}'.
author Rik <rik@octave.org>
date Sun, 19 Apr 2015 17:55:33 -0700
parents a8769ccb2c4e
children 5e0051460718
files doc/interpreter/func.txi doc/interpreter/genpropdoc.m doc/interpreter/io.txi libinterp/corefcn/error.cc libinterp/corefcn/file-io.cc libinterp/corefcn/regexp.cc libinterp/corefcn/utils.cc libinterp/corefcn/variables.cc scripts/io/dlmwrite.m scripts/io/strread.m scripts/io/textread.m scripts/io/textscan.m scripts/miscellaneous/warning_ids.m scripts/sparse/qmr.m
diffstat 14 files changed, 60 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/func.txi	Sun Apr 19 18:41:08 2015 -0400
+++ b/doc/interpreter/func.txi	Sun Apr 19 17:55:33 2015 -0700
@@ -114,8 +114,8 @@
 @end example
 
 The @code{printf} statement (@pxref{Input and Output}) simply tells
-Octave to print the string @qcode{"\a"}.  The special character @samp{\a}
-stands for the alert character (ASCII 7).  @xref{Strings}.
+Octave to print the string @qcode{"@xbackslashchar{}a"}.  The special character
+@samp{\a} stands for the alert character (ASCII 7).  @xref{Strings}.
 
 Once this function is defined, you can ask Octave to evaluate it by
 typing the name of the function.
--- a/doc/interpreter/genpropdoc.m	Sun Apr 19 18:41:08 2015 -0400
+++ b/doc/interpreter/genpropdoc.m	Sun Apr 19 17:55:33 2015 -0700
@@ -135,7 +135,7 @@
         s.doc = "Callback function executed immediately after __objname__ \
 has been created.  Function is set by using default property on root object, \
 e.g., @code{set (0, \"default__objname__createfcn\", \
-'disp (\"__objname__ created!\")') }.";
+'disp (\"__objname__ created!\")')}.";
         s.valid = valid_fcn;
 
       case "deletefcn"
--- a/doc/interpreter/io.txi	Sun Apr 19 18:41:08 2015 -0400
+++ b/doc/interpreter/io.txi	Sun Apr 19 17:55:33 2015 -0700
@@ -393,8 +393,8 @@
 performance of printing vector and matrix values.
 
 Implementation Note: For compatibility with @sc{matlab}, escape sequences in
-the template string (e.g., @qcode{"\n"} => newline) are expanded even
-when the template string is defined with single quotes.
+the template string (e.g., @qcode{"@xbackslashchar{}n"} => newline) are
+expanded even when the template string is defined with single quotes.
 
 @DOCSTRING(printf)
 
--- a/libinterp/corefcn/error.cc	Sun Apr 19 18:41:08 2015 -0400
+++ b/libinterp/corefcn/error.cc	Sun Apr 19 17:55:33 2015 -0700
@@ -1093,11 +1093,12 @@
 which will only stop execution if an error has been found.\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape\n\
-sequences in @var{template} (e.g., \"\\n\" => newline) are processed\n\
-regardless of whether @var{template} has been defined with single quotes,\n\
-as long as there are two or more input arguments.  To disable escape sequence\n\
-expansion use a second backslash before the sequence (e.g., \"\\\\n\") or\n\
-use the @code{regexptranslate} function.\n\
+sequences in @var{template} (e.g., @qcode{\"@xbackslashchar{}n\"} =>\n\
+newline) are processed regardless of whether @var{template} has been defined\n\
+with single quotes, as long as there are two or more input arguments.  To\n\
+disable escape sequence expansion use a second backslash before the sequence\n\
+(e.g., \"@xbackslashchar{}@xbackslashchar{}n\") or use the\n\
+@code{regexptranslate} function.\n\
 @seealso{warning, lasterror}\n\
 @end deftypefn")
 {
@@ -1392,11 +1393,12 @@
 workspace.\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape\n\
-sequences in @var{template} (e.g., \"\\n\" => newline) are processed\n\
-regardless of whether @var{template} has been defined with single quotes,\n\
-as long as there are two or more input arguments.  To disable escape sequence\n\
-expansion use a second backslash before the sequence (e.g., \"\\\\n\") or\n\
-use the @code{regexptranslate} function.\n\
+sequences in @var{template} (e.g., @qcode{\"@xbackslashchar{}n\"} =>\n\
+newline) are processed regardless of whether @var{template} has been defined\n\
+with single quotes, as long as there are two or more input arguments.  To\n\
+disable escape sequence expansion use a second backslash before the sequence\n\
+(e.g., \"@xbackslashchar{}@xbackslashchar{}n\") or use the\n\
+@code{regexptranslate} function.\n\
 @seealso{warning_ids, lastwarn, error}\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/file-io.cc	Sun Apr 19 18:41:08 2015 -0400
+++ b/libinterp/corefcn/file-io.cc	Sun Apr 19 17:55:33 2015 -0700
@@ -890,8 +890,8 @@
 The optional output returns the number of bytes written to the file.\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape sequences in\n\
-the template string (e.g., @qcode{\"\\\\n\"} => newline) are expanded even\n\
-when the template string is defined with single quotes.\n\
+the template string (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are\n\
+expanded even when the template string is defined with single quotes.\n\
 @seealso{fputs, fdisp, fwrite, fscanf, printf, sprintf, fopen}\n\
 @end deftypefn")
 {
@@ -960,8 +960,8 @@
 @end ifclear\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape sequences in\n\
-the template string (e.g., @qcode{\"\\\\n\"} => newline) are expanded even\n\
-when the template string is defined with single quotes.\n\
+the template string (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are\n\
+expanded even when the template string is defined with single quotes.\n\
 @seealso{fprintf, sprintf, scanf}\n\
 @end deftypefn")
 {
@@ -1069,8 +1069,8 @@
 converted.\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape sequences in\n\
-the template string (e.g., @qcode{\"\\\\n\"} => newline) are expanded even\n\
-when the template string is defined with single quotes.\n\
+the template string (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are\n\
+expanded even when the template string is defined with single quotes.\n\
 @seealso{printf, fprintf, sscanf}\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/regexp.cc	Sun Apr 19 18:41:08 2015 -0400
+++ b/libinterp/corefcn/regexp.cc	Sun Apr 19 17:55:33 2015 -0700
@@ -678,10 +678,11 @@
 @end table\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape sequences\n\
-in @var{pat} (e.g., @qcode{\"\\\\n\"} => newline) are expanded even when\n\
-@var{pat} has been defined with single quotes.  To disable expansion use\n\
-a second backslash before the escape sequence (e.g., \"\\\\n\") or use the\n\
-@code{regexptranslate} function.\n\
+in @var{pat} (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are expanded\n\
+even when @var{pat} has been defined with single quotes.  To disable\n\
+expansion use a second backslash before the escape sequence (e.g.,\n\
+\"@xbackslashchar{}@xbackslashchar{}n\") or use the @code{regexptranslate}\n\
+function.\n\
 \n\
 The outputs of @code{regexp} default to the order given below\n\
 \n\
@@ -1310,10 +1311,11 @@
 @end table\n\
 \n\
 Implementation Note: For compatibility with @sc{matlab}, escape sequences\n\
-in @var{pat} (e.g., @qcode{\"\\\\n\"} => newline) are expanded even when\n\
-@var{pat} has been defined with single quotes.  To disable expansion use\n\
-a second backslash before the escape sequence (e.g., \"\\\\n\") or use the\n\
-@code{regexptranslate} function.\n\
+in @var{pat} (e.g., @qcode{\"@xbackslashchar{}n\"} => newline) are expanded\n\
+even when @var{pat} has been defined with single quotes.  To disable\n\
+expansion use a second backslash before the escape sequence (e.g.,\n\
+\"@xbackslashchar{}@xbackslashchar{}n\") or use the @code{regexptranslate}\n\
+function.\n\
 @seealso{regexp, regexpi, strrep}\n\
 @end deftypefn")
 {
--- a/libinterp/corefcn/utils.cc	Sun Apr 19 18:41:08 2015 -0400
+++ b/libinterp/corefcn/utils.cc	Sun Apr 19 17:55:33 2015 -0700
@@ -1365,7 +1365,7 @@
 \n\
 Implementation Note: Strings are first converted to double values before the\n\
 checks for valid indices are made.  Unless a string contains the NULL\n\
-character \"\\0\", it will always be a valid index.\n\
+character @nospell{\"\\0\"}, it will always be a valid index.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/libinterp/corefcn/variables.cc	Sun Apr 19 18:41:08 2015 -0400
+++ b/libinterp/corefcn/variables.cc	Sun Apr 19 17:55:33 2015 -0700
@@ -2637,8 +2637,9 @@
 leftmost column.  @code{left-min} specifies the minimum field width to the\n\
 left of the specified balance column.\n\
 \n\
-The default format is\n\
-@qcode{\"  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;\\n\"}.\n\
+The default format is:\n\
+\n\
+@qcode{\"  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;@xbackslashchar{}n\"}\n\
 \n\
 When called from inside a function with the @qcode{\"local\"} option, the\n\
 variable is changed locally for the function and any subroutines it calls.  \n\
--- a/scripts/io/dlmwrite.m	Sun Apr 19 18:41:08 2015 -0400
+++ b/scripts/io/dlmwrite.m	Sun Apr 19 17:55:33 2015 -0700
@@ -50,9 +50,11 @@
 ##
 ## @item @qcode{"newline"}
 ## The character(s) to use to separate each row.  Three special cases
-## exist for this option.  @qcode{"unix"} is changed into @qcode{"\n"},
-## @qcode{"pc"} is changed into @qcode{"\r\n"}, and @qcode{"mac"} is changed
-## into @qcode{"\r"}.  Other values for this option are kept as is.
+## exist for this option.  @qcode{"unix"} is changed into
+## @qcode{"@xbackslashchar{}n"}, @qcode{"pc"} is changed into
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"}, and @qcode{"mac"} is changed
+## into @qcode{"@xbackslashchar{}r"}.  Any other value is used directly as the
+## newline separator.
 ##
 ## @item @qcode{"roffset"}
 ## See @var{r} above.
@@ -70,7 +72,7 @@
 ## @end example
 ##
 ## @example
-## dlmwrite ("file.tex", a, "delimiter", "&", "newline", "\\n")
+## dlmwrite ("file.tex", a, "delimiter", "&", "newline", "\n")
 ## @end example
 ##
 ## @seealso{dlmread, csvread, csvwrite}
--- a/scripts/io/strread.m	Sun Apr 19 18:41:08 2015 -0400
+++ b/scripts/io/strread.m	Sun Apr 19 17:55:33 2015 -0700
@@ -147,8 +147,10 @@
 ## @item @qcode{"whitespace"}
 ## Any character in @var{value} will be interpreted as whitespace and
 ## trimmed; the string defining whitespace must be enclosed in double
-## quotes for proper processing of special characters like \t.
-## The default value for whitespace = @qcode{" \b\r\n\t"} (note the space).
+## quotes for proper processing of special characters like
+## @qcode{"@xbackslashchar{}t"}.  The default value for whitespace is
+## @qcode{" @xbackslashchar{}b@xbackslashchar{}r@xbackslashchar{}n@xbackslashchar{}t"}
+## (note the space).
 ## Unless whitespace is set to '' (empty) AND at least one @qcode{"%s"} format
 ## conversion specifier is supplied, a space is always part of whitespace.
 ##
@@ -159,11 +161,11 @@
 ## depends on the last character of @var{str}:
 ##
 ## @table @asis
-## @item last character = @qcode{"\n"}
+## @item last character = @qcode{"@xbackslashchar{}n"}
 ## Data columns are padded with empty fields or Nan so that all columns
 ## have equal length
 ##
-## @item last character is not @qcode{"\n"}
+## @item last character is not @qcode{"@xbackslashchar{}n"}
 ## Data columns are not padded; strread returns columns of unequal length
 ##
 ## @end table
--- a/scripts/io/textread.m	Sun Apr 19 18:41:08 2015 -0400
+++ b/scripts/io/textread.m	Sun Apr 19 17:55:33 2015 -0700
@@ -36,7 +36,8 @@
 ## The first @var{value} number of lines of @var{filename} are skipped.
 ##
 ## @item @qcode{"endofline"}:
-## Specify a single character or @qcode{"\r\n"}.  If no value is given, it
+## Specify a single character or
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"}.  If no value is given, it
 ## will be inferred from the file.  If set to "" (empty string) EOLs are
 ## ignored as delimiters.
 ## @end itemize
--- a/scripts/io/textscan.m	Sun Apr 19 18:41:08 2015 -0400
+++ b/scripts/io/textscan.m	Sun Apr 19 17:55:33 2015 -0700
@@ -40,10 +40,10 @@
 ## leaves output in distinct columns.
 ##
 ## @item @qcode{"endofline"}:
-## Specify @qcode{"\r"}, @qcode{"\n"} or @qcode{"\r\n"} (for CR, LF, or
-## CRLF).  If no value is given, it will be inferred from the file.  If set
-## to "" (empty string) EOLs are ignored as delimiters and added to
-## whitespace.
+## Specify @qcode{"@xbackslashchar{}r"}, @qcode{"@xbackslashchar{}n"} or
+## @qcode{"@xbackslashchar{}r@xbackslashchar{}n"} (for CR, LF, or CRLF).  If no
+## value is given, it will be inferred from the file.  If set to "" (empty
+## string) EOLs are ignored as delimiters and added to whitespace.
 ##
 ## @item @qcode{"headerlines"}:
 ## The first @var{value} number of lines of @var{fid} are skipped.
--- a/scripts/miscellaneous/warning_ids.m	Sun Apr 19 18:41:08 2015 -0400
+++ b/scripts/miscellaneous/warning_ids.m	Sun Apr 19 17:55:33 2015 -0700
@@ -163,10 +163,10 @@
 ##
 ## @item Octave:language-extension
 ## Print warnings when using features that are unique to the Octave
-## language and may be still be missing in @sc{Matlab}.
+## language and that may still be missing in @sc{matlab}.
 ## By default, the @code{Octave:language-extension} warning is disabled.
-## The --traditional or --braindead startup options for Octave may also
-## be of use, @pxref{Command Line Options}.
+## The @option{--traditional} or @option{--braindead} startup options for
+## Octave may also be of use, @pxref{Command Line Options}.
 ##
 ## @item Octave:load-file-in-path
 ## By default, the @code{Octave:load-file-in-path} warning is enabled.
--- a/scripts/sparse/qmr.m	Sun Apr 19 18:41:08 2015 -0400
+++ b/scripts/sparse/qmr.m	Sun Apr 19 17:55:33 2015 -0700
@@ -76,8 +76,8 @@
 ## 1991, 60, pp. 315-339.
 ##
 ## @item
-## @nospell{R. Barrett, M. Berry, T. Chan, J. Demmel, J. Donato, J. Dongarra},
-## @nospell{V. Eijkhour, R. Pozo, C. Romine, and H. van der Vorst},
+## @nospell{ R. Barrett, M. Berry, T. Chan, J. Demmel, J. Donato, J. Dongarra},
+## @nospell{ V. Eijkhour, R. Pozo, C. Romine, and H. van der Vorst},
 ## @cite{Templates for the solution of linear systems: Building blocks
 ## for iterative methods}, SIAM, 2nd ed., 1994.
 ## @end enumerate