Neat. Personally, I wasn't aware of mathjax, it's a bit of a revelation to learn you can do this. I like very much the fact that the ASCII side is highly readable - compared to say, LaTeX (to me, anyway!) - as something I could use in code comments.
I use Typst a lot now (which this reminds me of), and the equation support is generally very good, but the thing that gives me pause is that I'm afraid that there's going to be something missing, or worse than the LaTeX equivalent.
LaTeX has been the industry standard for the mathematical world for decades and as a result it has had the most work adding new notation or making nicer formatting.
For example, I needed to do a proof tree recently. Typically I would use bussproofs in LaTeX but I was using Typst, and while there is a package for handling proof trees in Typst [1], I think they're not very pretty, and as a result I ended up porting the document over to Pandoc markdown and doing the rest of my work there (which is annoying because Typst renders around ~1000x faster and has better tooling).
I remember using curryst for my proof trees (a few months ago) and they looked fine if I recall correctly. But I agree that often using typst means searching for package that may not exist or is not working correctly since the ecosystem is not very mature currently.
What exactly is the distinction between this and mathjax? At first glance it looks like this is a wrapper on top of mathjax, or is it something different?
I guess it’s just more “natural” and less latex like.
asciimath does a lot of things automatically, like parenthesis sizing and auto-frac, that latex requires you to do yourself. \left and \right and \frac do add quite a bit of noise to simple equations.
Asciidoctor renders AsciiMath to MathML [1], I imagine that it's a fairly common target after MathML (Core) was revived from the dead. While MathML is pretty verbose to write by hand, I think things like AsciiMath and LaTeX are on a different level of abstraction. You can't embed AsciiMath directly in HTML in the same way that you can't embed Markdown directly in HTML.
XML as a standard has a concept of "notations": you can specify that contents of an element are written in such-and-such notation, which can be "asciimath" too. Of course at the XML level these are merely labels; you still need to agree on notation names and make the processors of that document to understand that notation. But as a foundation it is there.
So technically a web could indeed be a different place: a network of XML documents where all the original notations are kept as they are and merely marked with tags that formally specify: this is AsciiMath, this is C, this is SQL, and so on.
You can use it with AsciiDoc readily, if you use that [1]. With anything you could also use MathML in an HTML-passthrough block, but it's pretty verbose.
Great! Another LaTeX competitor, doubtless "better" for an obscure reason known only to its author. Especially appealing is the fact that, when embedded in a Web page, it must be translated into LaTeX syntax before rendering by MathJax.
The "AsciiMath" name reveals volumes, because prior to rendering, LaTeX code is already ASCII characters meant to represent math symbols. We just didn't call it that.
Oh well, a tempest in a teapot, soon to be forgotten. We can already tell a chatbot, "Show me the tensor equations of General Relativity, and render the result in LaTeX."
Neat. Personally, I wasn't aware of mathjax, it's a bit of a revelation to learn you can do this. I like very much the fact that the ASCII side is highly readable - compared to say, LaTeX (to me, anyway!) - as something I could use in code comments.
I use Typst a lot now (which this reminds me of), and the equation support is generally very good, but the thing that gives me pause is that I'm afraid that there's going to be something missing, or worse than the LaTeX equivalent.
LaTeX has been the industry standard for the mathematical world for decades and as a result it has had the most work adding new notation or making nicer formatting.
For example, I needed to do a proof tree recently. Typically I would use bussproofs in LaTeX but I was using Typst, and while there is a package for handling proof trees in Typst [1], I think they're not very pretty, and as a result I ended up porting the document over to Pandoc markdown and doing the rest of my work there (which is annoying because Typst renders around ~1000x faster and has better tooling).
[1] https://github.com/SkiFire13/typst-prooftree
I remember using curryst for my proof trees (a few months ago) and they looked fine if I recall correctly. But I agree that often using typst means searching for package that may not exist or is not working correctly since the ecosystem is not very mature currently.
Hadn't seen curryst. Looking at the examples it looks ok. Maybe I should have used that and stuck with Typst.
One could just use the math fragment of typst, no?
https://typerino.com/
I'm a big fan of AsciiMath and have been supporting it in my note taking program (MicroPad) since ~2016.
It was the key for me being able to write maths in a classroom/lecture theatre at the same speed (or faster) than those doing it by hand.
What exactly is the distinction between this and mathjax? At first glance it looks like this is a wrapper on top of mathjax, or is it something different?
I guess it’s just more “natural” and less latex like.
$$\sum_{i=0}^n i^2 = \frac{(n)}{2}$$
Vs
sum_(i=o)^n i^2=((n)/2)
asciimath does a lot of things automatically, like parenthesis sizing and auto-frac, that latex requires you to do yourself. \left and \right and \frac do add quite a bit of noise to simple equations.
If you like this, check out typst https://typst.app
It's too bad MathML never supported ASCII math. The web might be a different place if it did.
Asciidoctor renders AsciiMath to MathML [1], I imagine that it's a fairly common target after MathML (Core) was revived from the dead. While MathML is pretty verbose to write by hand, I think things like AsciiMath and LaTeX are on a different level of abstraction. You can't embed AsciiMath directly in HTML in the same way that you can't embed Markdown directly in HTML.
1. https://docs.asciidoctor.org/asciidoctor/latest/stem/asciima...
XML as a standard has a concept of "notations": you can specify that contents of an element are written in such-and-such notation, which can be "asciimath" too. Of course at the XML level these are merely labels; you still need to agree on notation names and make the processors of that document to understand that notation. But as a foundation it is there.
So technically a web could indeed be a different place: a network of XML documents where all the original notations are kept as they are and merely marked with tags that formally specify: this is AsciiMath, this is C, this is SQL, and so on.
Shameless plug: I made a competing library to asciimath called mathup
https://mathup.xyz
This is cool. I could see myself using this for notes.
You can use it with AsciiDoc readily, if you use that [1]. With anything you could also use MathML in an HTML-passthrough block, but it's pretty verbose.
1. https://docs.asciidoctor.org/asciidoctor/latest/stem/asciima...
Great! Another LaTeX competitor, doubtless "better" for an obscure reason known only to its author. Especially appealing is the fact that, when embedded in a Web page, it must be translated into LaTeX syntax before rendering by MathJax.
The "AsciiMath" name reveals volumes, because prior to rendering, LaTeX code is already ASCII characters meant to represent math symbols. We just didn't call it that.
Oh well, a tempest in a teapot, soon to be forgotten. We can already tell a chatbot, "Show me the tensor equations of General Relativity, and render the result in LaTeX."
I close with the obligatory XKCD reference: https://xkcd.com/927/