changeset 32880:ca64468e9710 stable

doc: Add category link list to top of graphic property pages (bug #57138) * doc/interpreter/genpropdoc.m: Add list of object property category link list to top of Graphic Object pages. Add xref links to category headings in property list.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Mon, 29 Jan 2024 20:42:41 -0500
parents 4629d3261ba8
children 8d59bdf485e2 8b17f4ebc13f
files doc/interpreter/genpropdoc.m
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/genpropdoc.m	Mon Jan 29 17:39:45 2024 -0500
+++ b/doc/interpreter/genpropdoc.m	Mon Jan 29 20:42:41 2024 -0500
@@ -3522,11 +3522,25 @@
   idx = strcmp (categories, "Unused");
   categories = [categories(!idx); categories(idx)];
 
+  ## Add links to categories at the top
+  str = sprintf ("%s\n\nCategories:\n\n", str);
+
+  for ii = 1:numel (categories);
+    str = sprintf ("%s@ref{XREF%s%s, , @w{%s}} %s", str, ...
+                   objname, strrep (categories{ii}, " ", ""), categories{ii});
+    if (ii < numel (categories))
+      str = sprintf ("%s| ", str);
+    endif
+  endfor
+
   idx = [];
   for ii = 1:numel (categories)
     fields = sort (allfields(strcmp (allcategories, categories{ii})));
     nf = numel (fields);
     str = sprintf ("%s\n\n@subsubheading %s", str, categories{ii});
+    str = sprintf ("%s\n@anchor{XREF%s%s}\n@prindex %s %s\n", str, ...
+                   objname, strrep (categories{ii}, " ", ""), ...
+                   objname, strrep (categories{ii}, " ", ""));
     str = sprintf ("%s\n\n@table @asis", str);
 
     for jj = 1:nf