Nice! A welcome addition! Too bad they're not using KaTeX [0] instead. It renders the maths server-side, so there's no runtime needed. An additional bonus is that the resulting math is copy-pasteable, which in the case of disply math might not be that useful (since most equations are to complex to be meaningfully copy-pasted with unicode), but it helps from inline math dissappearing when copy pasting texts. But, that…
Render mathematical expressions in Markdown On GitHub
21–30 of 114 posts
Re: Render mathematical expressions in Markdown On GitHub
#22> **The Cauchy-Schwarz Inequality** > $$left( \sum_{k=1}^n a_k b_k \right)^2 \leq left( \sum_{k=1}^n a_k^2 \right) left( \sum_{k=1}^n b_k^2 \right)$$ I wonder why their syntax highlighting on this example highlights `left` but not `right`? (I can't seem to reproduce it here, since the HN parser tries to outsmart me.)
For example, I cannot find a “left” attribute here: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
Re: Render mathematical expressions in Markdown On GitHub
#23> **The Cauchy-Schwarz Inequality** > $$left( \sum_{k=1}^n a_k b_k \right)^2 \leq left( \sum_{k=1}^n a_k^2 \right) left( \sum_{k=1}^n b_k^2 \right)$$ I wonder why their syntax highlighting on this example highlights `left` but not `right`? (I can't seem to reproduce it here, since the HN parser tries to outsmart me.)
The reason is that their blog rendering auto-identifies that code block as SCSS and treats “left” as an attribute. Which is strange, since I cannot find something for “left” that is not defined for “right”. For example, I cannot find a “left” attribute here: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
Re: Render mathematical expressions in Markdown On GitHub
#24OK:
$$\|\vec{x} - \vec{p}_c\| = v(t_c-t_0)$$
--
NOT OK:
$$
\|\vec{x} - \vec{p}_c\|
= v(t_c-t_0)
$$
This makes larger latex expressions pretty impractical e.g. https://github.com/jurasofish/multilateration/blob/master/re...
Re: Render mathematical expressions in Markdown On GitHub
#25Re: Render mathematical expressions in Markdown On GitHub
#26Re: Render mathematical expressions in Markdown On GitHub
#27Big picture it's interesting how GitHub + Markdown is basically becoming a major content publishing product. Albeit for a technical niche market. Of course I'm not saying this is GitHub's main goal. More like a P1. Instant publishing, diagrams, and now math expressions.
Re: Render mathematical expressions in Markdown On GitHub
#28Re: Render mathematical expressions in Markdown On GitHub
#29Nice! A welcome addition! Too bad they're not using KaTeX [0] instead. It renders the maths server-side, so there's no runtime needed. An additional bonus is that the resulting math is copy-pasteable, which in the case of disply math might not be that useful (since most equations are to complex to be meaningfully copy-pasted with unicode), but it helps from inline math dissappearing when copy pasting texts. But, that…
For pages with lots of mathematics markup, it is far better (in terms of download size) to send the latex markup and the katex library to the browser, and render it there. I tried rendering the mathematics server-side using katex on my own website a while ago, and the div soup generated by katex takes up loads of space. Original page (compressed): 10 kB Page with server-rendered Katex (compressed): 50 kB Katex.js (co…
Re: Render mathematical expressions in Markdown On GitHub
#30Math doesn't render inside a bullet list item. I don't know how to file an issue against Github itself, somewhat ironically.
https://github.com/github/feedback/discussions/categories/ge...