You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2022/11/01 12:11:59 UTC

[commons-math] branch master updated: Use latest MathJax URL

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b7cff82a Use latest MathJax URL
1b7cff82a is described below

commit 1b7cff82abf9c634ba443f30f001852597f4ef96
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Nov 1 12:05:04 2022 +0000

    Use latest MathJax URL
---
 pom.xml           | 8 +++++---
 src/site/site.xml | 9 +++++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index 83d905e48..4ccf0b1cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,7 +59,9 @@
     <commons.encoding>UTF-8</commons.encoding>
     <maven.compiler.source>1.8</maven.compiler.source>
     <maven.compiler.target>1.8</maven.compiler.target>
-    <math.mathjax.version>2.7.2</math.mathjax.version>
+    <!-- MathJax configuration also includes the prerequisite polyfill.min.js script.
+         See the maven-javadoc-plugin plugin. -->
+    <math.mathjax.url>https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js</math.mathjax.url>
     <math.commons.numbers.version>1.1-SNAPSHOT</math.commons.numbers.version>
     <math.commons.rng.version>1.5</math.commons.rng.version>
     <math.commons.geometry.version>1.0</math.commons.geometry.version>
@@ -429,7 +431,7 @@
           <links combine.self="override">
           </links>
           <!--  Enable MathJax -->
-          <additionalOptions>${doclint.javadoc.qualifier} ${allowscript.javadoc.qualifier} -header '&lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/${math.mathjax.version}/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;'</additionalOptions>
+          <additionalOptions>${doclint.javadoc.qualifier} ${allowscript.javadoc.qualifier} -header '&lt;script src="https://polyfill.io/v3/polyfill.min.js?features=es6"&gt;&lt;/script&gt;&lt;script type="text/javascript" async src="${math.mathjax.url}"&gt;&lt;/script&gt;'</additionalOptions>
         </configuration>
       </plugin>
       <plugin>
@@ -543,7 +545,7 @@
           <links combine.self="override">
           </links>
           <!--  Enable MathJax -->
-          <additionalOptions>${doclint.javadoc.qualifier} ${allowscript.javadoc.qualifier} -header '&lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/${math.mathjax.version}/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;'</additionalOptions>
+          <additionalOptions>${doclint.javadoc.qualifier} ${allowscript.javadoc.qualifier} -header '&lt;script src="https://polyfill.io/v3/polyfill.min.js?features=es6"&gt;&lt;/script&gt;&lt;script type="text/javascript" async src="${math.mathjax.url}"&gt;&lt;/script&gt;'</additionalOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/src/site/site.xml b/src/site/site.xml
index 973ef2d9b..a24d28b86 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -23,6 +23,11 @@
   </bannerRight>
 
   <body>
+    <head>
+      <![CDATA[<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
+<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>]]>
+    </head>
+
     <menu name="Math">
       <item name="Overview" href="/index.html"/>
       <item name="Downloads" href="http://commons.apache.org/math/download_math.cgi"/>
@@ -82,9 +87,5 @@
       <item name="Exceptions"              href="/userguide/exceptions.html"/>
     </menu>
 
-    <head>
-      <![CDATA[<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>]]>
-    </head>
-
   </body>
 </project>