changeset 30593:bcaa4c5f5928

maint: Merge stable to default.
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Wed, 05 Jan 2022 15:57:06 +0900
parents 2f1fae9dd79d (current diff) 939e69b45601 (diff)
children 0cb3f48da9da
files
diffstat 2 files changed, 19 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/private/__publish_html_output__.m	Tue Jan 04 08:58:31 2022 +0100
+++ b/scripts/miscellaneous/private/__publish_html_output__.m	Wed Jan 05 15:57:06 2022 +0900
@@ -117,15 +117,17 @@
 function outstr = do_header (title_str, intro_str, toc_cstr)
 
   mathjax_str = sprintf ("%s\n",
-'<script type="text/x-mathjax-config">',
-"MathJax.Hub.Config({",
-"  tex2jax: { inlineMath: [['$','$'], ['\\\\(','\\\\)']] },",
-"  TeX: { equationNumbers: { autoNumber: 'all' } }",
-"});",
+"<script>",
+"MathJax = {",
+"  tex: {",
+"    inlineMath: [['$','$'], ['\\\\(','\\\\)']],",
+"    tags: 'all'",
+"  }",
+"};",
 "</script>",
-['<script type="text/javascript" async ', ...
- 'src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?', ...
- 'config=TeX-MML-AM_CHTML"></script>']);
+'<script type="text/javascript" async ',
+'src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">',
+"</script>");
 
   stylesheet_str = sprintf ("%s\n",
 "<style>",
--- a/scripts/miscellaneous/publish.m	Tue Jan 04 08:58:31 2022 +0100
+++ b/scripts/miscellaneous/publish.m	Wed Jan 05 15:57:06 2022 +0900
@@ -859,9 +859,9 @@
 
   ## Regular expressions for the formats:
   ##
-  ## 1) Links "<http://www.someurl.com>"
+  ## 1) Links "<https://www.someurl.com>"
   ## 2) Links "<octave:Function SOME TEXT>"
-  ## 3) Links "<http://www.someurl.com SOME TEXT>"
+  ## 3) Links "<https://www.someurl.com SOME TEXT>"
   ## 4) LaTeX block math "$$x^2$$"
   ## 5) LaTeX inline math "$x^2$"
   ## 6) Bold *text*
@@ -893,7 +893,7 @@
                        "once");
       switch (i)
         case 1
-          ## Links "<http://www.someurl.com>"
+          ## Links "<https://www.someurl.com>"
           url = cstr{j};
           cstr{j} = formatter ("link", url(2:end-1), url(2:end-1));
         case 2
@@ -902,16 +902,17 @@
           url = cstr{j};
           url = texinfo_esc (url(9:idx-1));
           v = version ();
-          if (v(end) == '+')
-            v = "interpreter";
+          if (v(end) != '0')  # No official release
+            v = "latest";
+          else
+            v = ["v" v];  # "v6.4.0" etc.
           endif
-          url = sprintf ( ...
-            "https://www.gnu.org/software/octave/doc/%s/XREF%s.html", v, url);
+          url = sprintf ("https://octave.org/doc/%s/XREF%s.html", v, url);
           txt = cstr{j};
           txt = format_text (txt(idx+1:end-1), formatter);
           cstr{j} = formatter ("link", url, txt);
         case 3
-          ## Links "<http://www.someurl.com SOME TEXT>"
+          ## Links "<https://www.someurl.com SOME TEXT>"
           idx = strfind (cstr{j}, " ")(1);
           url = cstr{j};
           url = url(2:idx-1);