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

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

[Octave-bug-tracker] [bug #50247] add text properties link/info to help


From: Rik
Subject: [Octave-bug-tracker] [bug #50247] add text properties link/info to help text for text, title, xlabel, and others
Date: Wed, 8 Feb 2017 12:18:12 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #5, bug #50247 (project octave):

There are two separate issues here.  One is adding a reference to "Text
Properties".  That is the subject of this bug report and should be easy for
someone to fix.

The second issue is the display of links in a plaintext environment.  That
could be the subject of another bug report, although we have lived with the
current behavior for quite a while.  Texinfo does provide conditionals for
using different text in different output formats.  The one that would be of
most use here is


 '@inlinefmtifelse{FORMAT, THEN-TEXT, ELSE-TEXT}'
      Process the Texinfo THEN-TEXT if FORMAT output is being generated;
      otherwise, process ELSE-TEXT.


However, the tricky thing to resolve is that Octave is running the formatter
for 'info' output when producing the text for the terminal.  The file
scripts/help__makeinfo__.m would need modification.  I've attached a quick
implementation to this report as plaintext.diff, but I haven't checked if it
breaks anything. 


diff -r 589e7b0f2329 scripts/help/__makeinfo__.m
--- a/scripts/help/__makeinfo__.m       Wed Feb 08 08:46:54 2017 -0800
+++ b/scripts/help/__makeinfo__.m       Wed Feb 08 09:15:01 2017 -0800
@@ -127,10 +127,10 @@ function [retval, status] = __makeinfo__
     ## 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 --plaintext --no-headers --no-warn --no-validate
--force --output=- %s",
                        makeinfo_program (), name);
       case "html"
-        cmd = sprintf ("%s --no-headers --html --no-warn --no-validate
--force --output=- %s",
+        cmd = sprintf ("%s --html --no-headers --no-warn --no-validate
--force --output=- %s",
                        makeinfo_program (), name);
       otherwise
         error ("__makeinfo__: unsupported output type: '%s'", output_type);
diff -r 589e7b0f2329 scripts/plot/appearance/xlabel.m
--- a/scripts/plot/appearance/xlabel.m  Wed Feb 08 08:46:54 2017 -0800
+++ b/scripts/plot/appearance/xlabel.m  Wed Feb 08 09:15:01 2017 -0800
@@ -24,7 +24,9 @@
 ## Specify the string used to label the x-axis of the current axis.
 ##
 ## An optional list of @var{property}/@var{value} pairs can be used to
change
-## the properties of the created text label (@pxref{Text Properties}).
+## the properties of the created text label
+## @inlinefmtifelse{plaintext,
+## (use @address@hidden ("Text Properties")}})., (@pxref{Text Properties}).}
 ##
 ## If the first argument @var{hax} is an axes handle, then operate on
 ## this axis rather than the current axes returned by @code{gca}.


If you do carry through on the second bug report, it would be best to create a
macro so that one could write


@doclink{Text Properties}


and have it expand out to the longer inlinefmtifelse Texinfo command.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50247>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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