4 ms·
Finally a long-awaited feature. Works nicely in dark mode too. However, it simply uses MathJax. Also there are some minor annoyances. For example you need to e
by dllu 4y ago
Finally a long-awaited feature. Works nicely in dark mode too. However, it simply uses MathJax.
Also there are some minor annoyances. For example you need to escape the backslashes, so it takes 4 backslashes to make a newline in your matrix.
$$\begin{bmatrix} a & b \\\\ c & d\end{bmatrix}$$
I found that the inline math doesn't quite match the font size of the surrounding text too (it's smaller).
- thaumasiotes 4y ago> For example you need to escape the backslashes, so it takes 4 backslashes to make a newline in your matrix. > $$\begin{bmatrix} a & b \\\\ c & d\end{bmatrix}$$ This example doesn't make sense. You need to escape the backslashes in the end-of-row command \\, but you don't need to escape the backslashes in \begin and \end? The post clearly shows that backslashes in \left, \right, \sum, and \sqrt do not need to be escaped. What's different about \\?
- dllu 4y agoNo idea, but if you have only two backslashes instead of four, the matrix would appear as a single row, like [a bc d]. That said, \\begin renders the same as \begin.
- thaumasiotes 4y agoOh, this is an experimental result? You've found a bug in Github's parser. You should call it a "bug", not an "annoyance".
- fn-mote 4y agoThis is a pretty aggressive tone. I don't think it's warranted. As a data point: I have the same experience using MathJax in my own blog (Hugo, Goldmark markdown engine), so I'm assuming there's some structural reason for it, not blaming Github.
- xigoi 4y agoMaybe in GitHub Markdown, backslashes have to be escaped only if they could be interpreted as an escape character?
- runarberg 4y agoIn my opinion LaTeX is a poor fit for markdown, although it is the logical—and probably the only—choice. Markdown documents are supposed to be easy to read and quick to type. LaTeX is neither. When I include a matrix in my markdown document I want to type it something like: ## Example Matrix $$$ [a, b; c, d] $$$ Although I realize that we are probably stuck with LaTeX for the foreseeable future as the only way to type math in text files. Disclaimer, I am an author of an alternative math markup language specifically designed to be a good fit in Markdown.
- Gimpei 4y agoI agree. I thought the whole point of markdown was to be simple and readable. At this point, why not just use full latex instead.
- alanbernstein 4y agoI think you're right on all counts, especially on being stuck with LaTeX. What's your language? Any plans to build some sort of translator or other mechanism to allow high-quality rendering based on it?
- runarberg 4y agoThanks for asking... I mentioned it earlier in this thread, and didn’t want to spam it unprompted. But it is called Mathup (https://runarberg.github.io/mathup/ https://runarberg.github.io/mathup/) and I purposely just translated to MathML and with the intention to leave rendering to a different library (e.g. MathJax; or the browser if you’re only targeting Firefox or Safari)
- rahimiali 4y agothe matrix example is a good example of latex being too verbose for its markdown host. \underbrace and \begin{cases} are two others ones that seems antithetical to markdown. and maybe the fact that \left[ and \left( are not the default versions of [ and ( respectively. i'd be interested in collecting more if you can think of them.