Math on GitHub: Following Up
nschloe.github.io
Math on GitHub: Following Up
1–10 of 46 posts
Re: Math on GitHub: Following Up
#2Re: Math on GitHub: Following Up
#3In May, GitHub added native math support. Unfortunately, it left lots to be desired. Six weeks later, I'm taking another look. Have the major issues been fixed? (Spoiler: No.)
Plain latex has a steep curve and not friendly for mobile typing. Plain text is hard to read and hinders the actual math understanding. Therefore, i use gist markdown.
Re: Math on GitHub: Following Up
#4The commonmark spec defines left- and right-flanking delimiters, and provides a reference implementation that can get this right for backticks to represent inline code. Doing the same with dollar signs - and treating the content delimited by them, like the content delimited by backticks, as not to be processed further as markdown should handle most use cases.
Admittedly, the phrase "an apple costs $1 but an orange is 2$ for some reason" would be incorrectly recognised as math, but only because you're switching how you place the dollar signs halfway through.
Not recognising $[a+b](c+d)$ because the brackets are also link syntax sounds like the parsing operations are done in the wrong order. The $ comes first, so it should win.
I've used jupyter-book to typeset math-in-markdown before now, and it gets this just right, showing that it's a solved problem in practice too unless I'm missing something.
Re: Math on GitHub: Following Up
#5i had to go and fix like 20 markdown files
how can someone thing this is good syntax is beyond me.
Re: Math on GitHub: Following Up
#6Re: Math on GitHub: Following Up
#7[1]: https://pandoc.org/
Re: Math on GitHub: Following Up
#8this feature is super garbage: `this costs 5$ but that is 8$, what do you think` is now math expression with all kinds of broken rendering i had to go and fix like 20 markdown files how can someone thing this is good syntax is beyond me.
Re: Math on GitHub: Following Up
#9I wonder how pandoc[1] does this. You can convert Markdown to PDF (`pandoc test.md -o test.pdf`), it uses the same syntax as GitHub ($ signs only, no backticks) and it fares a lot better than GitHub in a few of the tests outlined in the article[2]. It's not perfect but clearly something better can be done. [1]: https://pandoc.org/ [2]: https://nsood.in/hn-latex/test.pdf