pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

Update mathjax to version 3 or move extra.js below mathjax call?

Open eeholmes opened this issue 2 years ago • 1 comments

Enhancement request. Not a bug per se.

In the head.html template, MathJax v2.7 is being used and that is 5 years out of date. None of the MathJax v3 configuration scripts work with v2.7. Would it be possible allow the user to pass in mathjax: in template: so one can update the link for the MathJax library? One can do this in the Rmd file, but pkgdown doesn't use that.

template:
  mathjax: "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"

Here is what is in the head.html template. mathjax would replace the src js.

<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>

I can pass in my own pkgdown/template/head.html file, but it'd be nice to be able to just pass in mathjax in the yaml.

Thanks!

eeholmes avatar May 16 '23 05:05 eeholmes

related #1966

maelle avatar Jun 09 '23 07:06 maelle

Dupliate of #1966

hadley avatar Apr 12 '24 13:04 hadley