3 ms·
In 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
by runarberg 4y ago
In 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.
- runarberg 4y agoI collected some in the doc page for mathup (link in cousin post). Although I’m not sure I tackled \underbrace sufficiently. E.g. This is how I explain up-arrow notion with a mathup expression: obrace(a\`↑↑`b = ubrace(a^a^⋰^a)._(b "times")).^"" "up-arrow" notation "" I don’t think you’ll be able to read this without knowing some of the syntax... which is a failure on my part as author. `obrace` and ubrace` are clear `.^` puts the following expression (a text that works the same way as backticks in markdown) over the preceding expression. `._` does the same but puts it under. and the backslash will make the thing surrounded by backticks (\`↑↑`) an operator. But this is a fairly complected expression. And my goal was never to make every expression look simple. A far more common expression would be easier: a^n = obrace(a xx a xx cdots xx a).^(n "times") which could also be written as: a^n = (a × a × ⋯ × a).^⏞.^(n "times") Regarding cases, in mathup could write: n! = { 1, if n <= 1 (n-1)!, otherwise However the alignment won’t be perfect... I was always going to go back and fix that, but I never got around to do that. Other improvements include, using white space smartly to group things together e.g. (This example also showcases using slash to denote fraction) a/b + c/d != a / b+c / d