1. 10
    1. 4

      Nice! I also made my own static site generate which uses KaTeX instead of hevea to render LaTeX to static HTML: https://github.com/rubenvannieuwpoort/static-site-generator

      It’s a bit more heavy-handed (as in: it outputs a lot of HTML elements to format relatively simple formulae), but the math it generates is really beatiful, and since I don’t put all of my posts on one page, my requirements are probably a little bit different.

      See also my blog, which is generated with my static site generator: https://rubenvannieuwpoort.nl

      This blog is a gem, by the way.

      1. 1

        The op mentions hevea being quite slow. How is server side rendered KaTeX in this regard?

        And I love the overall look of your posts!

        1. 3

          Thanks :)

          To be honest, it’s not terribly fast either. Currently, the blog has 7 posts, none of which are very long. This site takes 5 seconds to generate, which is not very slow. I think KaTeX takes the majority of the time, since there’s not too much else going on. It’s fair when you check the HTML, since the formulae consist of hundreds of DOM nodes.

          So, everything comes at a price. For me, this is acceptable since I don’t put all posts on one page. I don’t think it would be an acceptable solution for the blog in this thread since it would likely make loading/rendering the blog very slow.

    2. 2

      Somewhat related, I once started working on a frankenstein abomination of a plugin for SILE for typesetting ASCIIMath-formatted equations. It’s a kinda funny pipeline, as it goes:

      ASCIIMath → MathML → (partial, text-only) SVG → SILE (i.e. Lua)

      Unfortunately, one of the challenges I stumbled upon near the end kinda made my motivation wane in this particular project. Why frankenstein abomination, you may ask? Because it’s Lua code that was semi-manually translated from completely unrelated JS (ASCIIMath.js) and Python (MathML->SVG) codebases! :D yet it actually resulted in fairly regular and idiomatic Lua! :D More high-level details are present in a comment in a different issue #578 in SILE.

    3. 1

      this is very impressive. I wonder if the author thinks this code can compile in into Android library (with Android NDK) and into an IOS library. If that works, it can be used within React-native (or any other html-aware viewers on a mobile platform). It would solve, what I, at least think, is a huge problem in mobile: no WebView-free math renderer.

    4. 1

      Very cool. After skimming the code he could thread it per post pretty easily or create a Makefile for make -j since it’s super chunkable. Beautiful job.

Stories with similar links:

  1. Best practices for array indexing via calvin 3 years ago | 9 points | 1 comment
  2. Incunabulum for the 21st century: Making the J interpreter compile in 2020 via calvin 3 years ago | 9 points | 3 comments