Math in HTML viewer

Dear all, I would like to ask a question about the abilities of Zotero's HTML viewer regarding the display of math, equations, etc.

On Zotero 7.0.9, the HTML viewer is very handy to annotate documents just like pdfs. However, it seems that some rendering of math symbol are missing.

For example, when creating a HTML document, I had to use MathML (https://www.w3.org/Math/), others "engines", like MathJax (https://www.mathjax.org/) or Katex (https://github.com/KaTeX/KaTeX) failed to produce HTML with good math rendering in Zotero's HTML viewer.

I am not familiar with this, and just noticed that some "engines" seemed to work while playing around with Quarto's options (https://quarto.org/docs/output-formats/html-basics.html#latex-equations).

What are the "engines" currently supported by Zotero? What are the available options to make existing math in HTML document render correctly in Zotero?



Screenshots of the rendering within Zotero's HTML viewer of three different HTML documents made with three different math engines:

https://s3.amazonaws.com/zotero.org/images/forums/u8654986/03733z5o44bw7alut52f.png

https://s3.amazonaws.com/zotero.org/images/forums/u8654986/ra0sm8axcgdjt3add93c.png

https://s3.amazonaws.com/zotero.org/images/forums/u8654986/petunnu49a201vyfw6cz.png

  • edited 3 days ago
    You're talking about creating an HTML file, adding that to Zotero as an attachment, and viewing it in the built-in reader?

    MathJax and KaTeX are JavaScript-based libraries, so they won't work in the reader, which disables JavaScript. MathML is natively supported by the underlying Firefox browser, so it will render properly.
  • > You're talking about creating an HTML file, adding that to Zotero as an attachment, and viewing it in the built-in reader?

    Yes, sorry if I was not very clear. Some HTML documents displays correctly while other don't and I would like to make sure the documents I create are well displayed within Zotero.

    > MathJax and KaTeX are JavaScript-based libraries, so they won't work in the reader, which disables JavaScript. MathML is natively supported by the underlying Firefox browser, so it will render properly.

    Understood many thanks!
Sign In or Register to comment.