commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stian Soiland-Reyes (JIRA)" <>
Subject [jira] [Commented] (NUMBERS-36) mathjax CDN shutting down - will soon break javadoc
Date Tue, 09 May 2017 11:11:04 GMT


Stian Soiland-Reyes commented on NUMBERS-36:

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, by modifying {{maven-javadoc-plugin}} to:

               <additionalparam>-Xdoclint:all --allow-script-in-comments -header '&lt;script
type="text/javascript" src="{@docRoot}/META-INF/resources/webjars/mathjax/2.7.0/MathJax.js"&gt;&lt;/script&gt;'</additionalparam>

However this doesn't work, as for compatibility with WAR, webjars have folders like {{META-INF/resources/webjars/mathjax/2.7.0}},
but {{maven-javadoc-plugin}}
sadly [ignores META-INF|].

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  (as currently
committed on master).

> mathjax CDN shutting down - will soon break javadoc
> ---------------------------------------------------
>                 Key: NUMBERS-36
>                 URL:
>             Project: Commons Numbers
>          Issue Type: Bug
>            Reporter: Stian Soiland-Reyes
>            Assignee: Stian Soiland-Reyes
> Javadoc for Commons Math, Commons Numbers and friends use a the [MathJax|]
Javascript in order to render LaTeX equation within Javadoc. (See MATH-1006)
> This used to be included as
-- but now [ is shutting down|].
There is a temporary redirect.
> There are several alternatives suggested, with the recommended being:
> {code}
> <script type="text/javascript" async
>   src="">
> </script>
> {code}
> Other alternatives include - e.g.
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=TeX-AMS-MML_HTMLorMML}} would
make any difference there as rawgit caches the file directly from GitHub.
> Of course the MathJax javascript is Apache-licensed, so we could easily embed it in the
ASF source code - but then in multi-module projects I wonder if we would then need to share
it across all modules.

This message was sent by Atlassian JIRA

View raw message