MathJax support
faroit opened this issue · 2 comments
Feature description
existing math code should be rendered correctly.
Example page:
https://thegradient.pub/transformers-are-graph-neural-networks/
However, math is shown as code:
Thanks for the report. Percollate is designed to work with the raw HTML markup, and it occasionally breaks for websites whose content relies on JavaScript.
Since we can't execute the webpage's referenced scripts, what we can do is try to run MathJax in Node.js — or even better, KaTeX? — on the webpage's content. This would mean, however, that we take a guess on the markup used on the page (delimiter, syntax, etc.)
Update: On a closer look, KaTeX only supports MathML output, which the Chromium engine does not yet support.
Since LaTeX-on-the-web generally does not contain hints in the HTML markup about how to render it (with most libraries opting for a JS configuration API instead), we can't decide on the correct config to render math in web pages. Therefore unfortunately it sounds like we won't be able to add support in percollate
.