[ https://issues.apache.org/jira/browse/NUMBERS36?page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel&focusedCommentId=16002501#comment16002501
]
Stian SoilandReyes commented on NUMBERS36:

Sorry, it seems just {{MathJax.js}} is insufficient as it will try to load various other resources
by relative paths.
For reference, in theory we could include the whole MathJax distribution repackaged into Maven
artifacts from http://www.webjars.org/, by modifying {{mavenjavadocplugin}} to:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>mavenjavadocplugin</artifactId>
<configuration>
<additionalparam>Xdoclint:all allowscriptincomments header '<script
type="text/javascript" src="{@docRoot}/METAINF/resources/webjars/mathjax/2.7.0/MathJax.js"></script>'</additionalparam>
<resourcesArtifacts>
<resourcesArtifact>
<groupId>org.webjars.npm</groupId>
<artifactId>mathjax</artifactId>
<version>2.7.0</version>
</resourcesArtifact>
</resourcesArtifacts>
</configuration>
</plugin>
{code}
However this doesn't work, as for compatibility with WAR, webjars have folders like {{METAINF/resources/webjars/mathjax/2.7.0}},
but {{mavenjavadocplugin}}
sadly [ignores METAINFhttps://github.com/apache/mavenplugins/blob/a9566e14f980ff52f3ee3c89d64d6b98b03c0305/mavenjavadocplugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java#L4234].
Another problem is that the mathjax JAR is 23 MB (it is also the complete git source tree),
which in our case would be embedded within each of the module's Javadoc folders, and also
within the javadoc.jar (if we add that javadoc config to {{<build><plugins>}})
So  sorry for this disgression  I think I will change my opinion to go with the new official
CDN hosted at https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js (as currently
committed on master).
> mathjax CDN shutting down  will soon break javadoc
> 
>
> Key: NUMBERS36
> URL: https://issues.apache.org/jira/browse/NUMBERS36
> Project: Commons Numbers
> Issue Type: Bug
> Reporter: Stian SoilandReyes
> Assignee: Stian SoilandReyes
>
> Javadoc for Commons Math, Commons Numbers and friends use a the [MathJaxhttps://www.mathjax.org/]
Javascript in order to render LaTeX equation within Javadoc. (See MATH1006)
> This used to be included as http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeXAMSMML_HTMLorMML
 but now [cdn.mathjax.org is shutting downhttps://www.mathjax.org/cdnshuttingdown/].
There is a temporary redirect.
> There are several alternatives suggested, with the recommended being:
> {code}
> <script type="text/javascript" async
> src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?...">
> </script>
> {code}
> Other alternatives include rawgit.com  e.g. https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js
with a fixed version  which is probably a good thing. I've tried this approach for Commons
Numbers, which seems to work  not sure if adding {{?config=TeXAMSMML_HTMLorMML}} would
make any difference there as rawgit caches the file directly from GitHub.
> Of course the MathJax javascript is Apachelicensed, so we could easily embed it in the
ASF source code  but then in multimodule projects I wonder if we would then need to share
it across all modules.

This message was sent by Atlassian JIRA
(v6.3.15#6346)
