
The monospace font ensures that blocks of texts can be combined and aligned easily, and also make compound symbols like the sum, sqrt and the big parentheses that require multiple characters to be properly aligned. Even with monospace, you’d be surprised how non-trivial it is to get alignment right. It took me a few hours to find the right CSS style! Many editors (even IDEs) add blank pixel lines between lines of text, and many fonts don’t scale well resulting in added pixels.

I like it. Makes me want to add mathematical elements for pict & 2htdp/image

Yes, it would be great to have the same tools for pict. This will be more demanding though, because it’s possible to do much better, which means much more time trying to get things right :wink:

But text-block is super light weight, which means it renders instantly and does not require any GUI. You can display math on the command line. I’m already using it to make read some formulas written for Racket, it makes them much more readable.

@soegaard2 It should be pretty straightforward to write a racket-cas displayer like this one: https://github.com/Metaxal/text-block/blob/main/math.rkt#L301

Thanks for the pointer!