Completely tangential, but any recommendations on online complex math courses for engineers who haven't been in school for 15+ years? :D
Math on GitHub: The Good, the Bad and the Ugly
51–60 of 71 posts
Re: Math on GitHub: The Good, the Bad and the Ugly
#52Earlier quoted context omitted.
A code block is used to display text literally, except adding syntax coloring. You would use it to display TeX source notation for example. A math block transforms TeX into something else, it's entirely different. I think it's correct that they did not use the code block syntax for this.
It's how Github already handles Mermaid diagrams, so there's precedent, although you're correct that logically there should be a distinction between "display highlighted Mermaid source" and "render Mermaid diagram".
Re: Math on GitHub: The Good, the Bad and the Ugly
#53Earlier quoted context omitted.
This is why I prefer AsciiDoc. It's consistent because there's only one implementation, it's less ambiguous, and more predictable. Although it takes a bit longer to remember all the syntax, it's not difficult, especially if you're only going to use the same subset of features that markdown supports since it supports most of the markdown syntax as well. I also much prefer the flexibility with tables compared to markdo…
Looks crazy verbose compared to $ and $$, especially if you're actually using it intensively.
It's certainly not perfect, but I much prefer it for the flexibility and consistency to the dozens of markdown implementations that all do things a little different and not needing to drop down into HTML when I need to do something just outside of markdown's capabilities.
Re: Math on GitHub: The Good, the Bad and the Ugly
#54Completely tangential, but any recommendations on online complex math courses for engineers who haven't been in school for 15+ years? :D
It’s all pretty much the same thing, but the emphasis is different depending on if the objects of your study are physical or non-physical.
Re: Math on GitHub: The Good, the Bad and the Ugly
#55First about the choice of delimiter. It argues for the use of \(…\) and \[…\] instead of $…$ and $$…$$. They don’t even explain why, but cite an external link to, guess what, a reason why the former is better for LaTeX, not markdown.
Then they made a claim about why putting math inside code delimiters are better.
Detouring a little bit, my guess that GitHub chooses this delimiter is because they have prior collaboration with the author of pandoc to create the common mark spec. Their GFM parser is an extension of a common mark parser.
And since pandoc chooses the dollar sign delimiter as the math delimiter, it is natural for them to choose it too, just to have lesser variants.
Then why pandoc choose $ instead of \(…\) and \[…\]? And would that goes against the best practice of LaTeX?
The answer to the latter question is no, because the $ is the markdown delimiter, and when transpiled to LaTeX, it becomes the \(…\) and \[…\].
Answer to the first question is related to the fact that at least in pandoc, \[ means escaping the [. So to type \[ in markdown, it should be \\[, which is cumbersome. (There’s a special flag in pandoc that you can use bare \(…\) and \[…\] though.)
And since all this parsing is happening at the parser level, the code-delimiter argument is invalid. They are thinking more in terms of hacking an existing parser and render math as a post-processing step.
The second fatal error is comparing MathJax to KaTeX by showing the commit freq. and claim that MathJax is dead.
This is a really amateurish argument seen occasionally elsewhere in the open source community that if a software has no recent commit history it is dead.
In this particular instance, KaTeX is far behind MathJax in terms of coverage of rendering valid LaTeX math. This alone means they have a lot of catch up to do and no wonder a less mature software has more commit activity than a more mature one.
MathJax is backed by a lot of organizations/universities and they have commitment to maintain it. It is far from being dead.
KaTeX aims at being fast (MathJax 3 reclaim that territory a bit but AFAIK KaTeX is still king in that aspect.) If the math you use can be rendered by KaTeX, then use it. But it happened to me that I have to change a config to use MathJax instead of KaTeX because soon or later I’m going to use something KaTeX doesn’t support.
As GitHub doesn’t give you choice, choosing a default that has better coverage is no brainer.
Re: Math on GitHub: The Good, the Bad and the Ugly
#56Did Github ever solicit feedback from the community for this feature? Was there ever a beta before they rolled it out? Because some of these critiques really should have been dealt with beforehand and I'm concerned that we're now stuck with lousy defaults that they won't ever be able to change. The visual font size problem seems particularly disastrous: > The math font is a really small, > MathJax’s default font MJXT…
> Did Github ever solicit feedback from the community for this feature? Was there ever a beta before they rolled it out?
There actually was a closed preview for this, but it wasn't long and the feedback I gave them (which is almost everything that's in the blog post) wasn't implemented.
> The visual font size problem seems particularly disastrous:
They made the decision to match the capital heights of the two fonts, not the x-heights. If they match the x-heights, the capitals in math mode will be too large.
Since the small letters are way to small, perhaps they'll increase math font size a little bit in the future to balance it out.
Re: Math on GitHub: The Good, the Bad and the Ugly
#57Did Github ever solicit feedback from the community for this feature? Was there ever a beta before they rolled it out? Because some of these critiques really should have been dealt with beforehand and I'm concerned that we're now stuck with lousy defaults that they won't ever be able to change. The visual font size problem seems particularly disastrous: > The math font is a really small, > MathJax’s default font MJXT…
Small font size seems the easiest to fix. Kerning seems worse since people will manually tweak spacing with \, etc, so you can't just change it whenever you want.
Re: Math on GitHub: The Good, the Bad and the Ugly
#58A source block type would have been a very natural fit, it’s surprising that isn’t how they chose to go. ```equation e^{i\pi}+1\eq0 ``` feels like what i’d try to do right off the bat.
A code block is used to display text literally, except adding syntax coloring. You would use it to display TeX source notation for example. A math block transforms TeX into something else, it's entirely different. I think it's correct that they did not use the code block syntax for this.
The main idea of using code blocks for math is to protect its content from being messed with. Markdown parsers do that by default, so that's how it's "natural". As you mention, the drawback is that you can't have a codeblock with syntax highlighting for a language called "math" (should there ever be one), but that seems like a small price to pay.
Re: Math on GitHub: The Good, the Bad and the Ugly
#59One thing that the article gets wrong is accusing mathjax of being abandoned. Development has moved to a new repo for the next version. https://github.com/mathjax/MathJax-src/graphs/contributors
Thanks for the hint! I had indeed overlooked that. I have updated the article accordingly.
Re: Math on GitHub: The Good, the Bad and the Ugly
#60I’m very happy they went with simple $..$ and $$…..$$ This is much more natural for anyone doing math or science and also makes it easy to copy and paste math from elsewhere It’s better that the parser works harder than to force an inconvenient syntax on the user.
One problems is that the parser doesn't work harder yet, and it will be difficult even for GitHub to make it so. The $-syntax is familiar to TeXies indeed, but if the cost is that math won't ever work properly, I'd rather have a markdowny syntax.