For the sake of it, I have created something slightly similar in the past which is currently rewritten in my spare time. It is not finished yet, but I can show you an example. Of course, I have the code for it online.<p>Example: <a href="https://gist.github.com/W4RH4WK/d6e9861a7793bfce6d1a0c26a1ba8383" rel="nofollow">https://gist.github.com/W4RH4WK/d6e9861a7793bfce6d1a0c26a1ba...</a><p>Project: <a href="https://github.com/W4RH4WK/Dogx" rel="nofollow">https://github.com/W4RH4WK/Dogx</a><p>I am using Pandoc, KaTeX, Prims.js, and Reveal.js (for presentations). Additional logic is realized using Pandoc's filter mechanic and a Python scripts which converts TeX to SVG. The main intention is to output a standalone HTML, which can then be converted to a PDF using the awesome wkhtmltopdf.<p>This has 2 underlying reasons: First, I want to push the behavior of consuming content on your screen, with modern, interactive technologies instead of killing trees by printing them out. Secondly, I hate TeX / LaTeX, but I cannot deny the need for its Math environment and TikZ.