quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.96k stars 326 forks source link

[revealjs] Support for MathJax3 #4493

Open sbrisard opened 1 year ago

sbrisard commented 1 year ago

For a revealjs document format, Mathjax is configured as follows

      math: {
          mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
...........
          },
        },

while for a book, we get a more recent version of MathJax

<script src="[https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js](view-source:https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js)" type="text/javascript"></script>

Is it intentional, or should it be considered a bug? Can I specify the version of MathJax I want to use?

jjallaire commented 1 year ago

Currently the Pandoc Revealjs format supports only MathJax v2. It used to be that Reveal only supported MathJax v2, but in Reveal v4.2 they added support for MathJax 3 and KaTeX. I believe there needs to be a change in Pandoc to be able to take advantage of this (see this discussion: https://github.com/jgm/pandoc/issues/7660).

@tarleb What's your viewpoint on this?

tarleb commented 1 year ago

I don't know much about this topic yet — taking a look now.

cderv commented 1 year ago

Just a note to self that it seems specifying Mathjax option load correctly Mathjax 3 https://github.com/quarto-dev/quarto-cli/discussions/3127#discussioncomment-4031511

need to look if this is now ok with the plugin too.

cderv commented 1 year ago

This will solve also