grantmcdermott / quarto-revealjs-clean

A minimalist and elegant presentation theme for Quarto Reveal.js
https://grantmcdermott.com/quarto-revealjs-clean-demo/template.html
MIT License
245 stars 42 forks source link

math display breaks when a tinytable is includedf´ #13

Closed m-g-h closed 6 months ago

m-g-h commented 6 months ago

The display of mathjax equations breaks when I include a tinytable. You can also see it on your slides: go to the Components - Blocks slide. The font of the equation is off, and if you try to render an integral it is completely broken.

grantmcdermott commented 6 months ago

I don't know what you mean by "include a tinytable". Do you mean math rendering in the table itself, or the template as a whole? Please provide a MWE and/or screenshot in future.

Some comments:

1) Either specify an updated MathJax CDN in your YAML:

   format: clean-revealjs
   html-math-method:
     method: mathjax
     url: "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"

2) Render via MathML instead of MathJax. Again, in your YAML:

   format: clean-revealjs
   html-math-method:
     method: mathml

Final point: Again, because of variation across browser support (true for both the MathJax and MathML engines) your best bet is to use a common, standalone browser like Firefox or Chrome. Rendering from inside RStudio or VS Code is not a fair test.

Closing now, since these are upstream issues with workarounds per the above. But let me know if neither solves the problem for you.

grantmcdermott commented 6 months ago

FWIW I just released a minor template update that adds the updated MathJax CDN as part of the YAML. https://github.com/grantmcdermott/quarto-revealjs-clean/releases/tag/v1.2

I was reluctant to do this originally for several reasons. (I don't like adding bloat to a user's YAML, MathJax is probably better configured from the user's side, etc. etc.) But on reflection I think it's worth it to ensure a better math rendering experience out the gate. Or, at least, make a good rendering experience more likely.