octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56929] csvread help text xref to dlmread appe


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #56929] csvread help text xref to dlmread appears confusingly when displayed in info format
Date: Tue, 24 Sep 2019 12:18:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #8, bug #56929 (project octave):

@Rik: Thanks. I tested your patch and, as is, it doesn't do well with 3
arguments calls. See e.g. "help line" which displays


octave:1> help line
...
Programming Note: The full list of properties is documented at
see Line Properties Line Properties.
...


The problem with this approach is that it is impossible to distinguish @ref,
@xref and @pxref (and decide to add "See", "see" or nothing).

On the other hand, I've had no luck trying to define new macros @oref, @oxref
and @opxref to distinguish plaintext and other outputs. So far I've tried
this:


diff -r 251056aeba5d doc/interpreter/macros.texi
--- a/doc/interpreter/macros.texi       Mon Sep 23 13:51:17 2019 -0700
+++ b/doc/interpreter/macros.texi       Tue Sep 24 18:12:28 2019 +0200
@@ -84,6 +84,42 @@
 @end macro
 @end ifnotinfo
 
+@c The following macros o*ref redefine the corresponding *ref macros to
avoid
+@c info-like references ("Note ...") in static help strings.
+
+@ifnotplaintext
+@macro oref{arg1, arg2, arg3, arg4, arg5}
+@ref{\arg1\, \arg2\, \arg3\, \arg4\, \arg5\}
+@end macro
+@end ifnotplaintext
+
+@ifplaintext
+@macro oref{arg1, arg2, arg3, arg4, arg5}
+\arg3\
+@end macro
+@end ifplaintext
+
+@ifnotplaintext
+@macro oxref{arg1, arg2, arg3, arg4, arg5}
+@xref{\arg1\, \arg2\, \arg3\, \arg4\, \arg5\}
+@end macro
+@end ifnotplaintext
+
+@ifplaintext
+@macro oxref{arg1, arg2, arg3, arg4, arg5}
+See \arg3\
+@end macro
+@end ifplaintext
+
+@macro opxref{arg1, arg2, arg3, arg4, arg5}
+@ifnotplaintext
+@pxref{\arg1\, \arg2\, \arg3\, \arg4\, \arg5\}
+@end ifnotplaintext
+@ifplaintext
+see \arg3\
+@end ifplaintext
+@end macro
+
 @c FIXME: someday, when Texinfo 5.X is standard, we might replace this with
 @c @backslashchar, which is a new addition to Texinfo.
 
diff -r 251056aeba5d scripts/help/__makeinfo__.m
--- a/scripts/help/__makeinfo__.m       Mon Sep 23 13:51:17 2019 -0700
+++ b/scripts/help/__makeinfo__.m       Tue Sep 24 18:12:28 2019 +0200
@@ -128,7 +128,7 @@
     ## Take action depending on output type
     switch (lower (output_type))
       case "plain text"
-        cmd = sprintf ('%s --no-headers --no-warn --force --no-validate
--output=- "%s"',
+        cmd = sprintf ('%s --no-headers --no-warn --force --no-validate
--plaintext --output=- "%s"',
                        makeinfo_program (), name);
       case "html"
         cmd = sprintf ('%s --no-headers --html --no-warn --no-validate
--force --output=- "%s"',
diff -r 251056aeba5d scripts/io/csvread.m
--- a/scripts/io/csvread.m      Mon Sep 23 13:51:17 2019 -0700
+++ b/scripts/io/csvread.m      Tue Sep 24 18:12:28 2019 +0200
@@ -31,7 +31,7 @@
 ## @end example
 ##
 ## Any optional arguments are passed directly to @code{dlmread}
-## (@pxref{XREFdlmread,,dlmread}).
+## (@opxref{XREFdlmread,,dlmread}).
 ## @seealso{dlmread, textscan, csvwrite, dlmwrite}
 ## @end deftypefn



This works for "help csvread" but fails for some mysterious reason (and
mystery is even documented in texinfo's documentation,
https://www.gnu.org/software/texinfo/manual/texinfo-html/Macro-Details.html)
when compiling and trying to generate html and pdf output...

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56929>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]