Live data from Hacker News

Math on GitHub: The Good, the Bad and the Ugly

nschloe.github.io

11–20 of 71 posts

Re: Math on GitHub: The Good, the Bad and the Ugly

#11
post #7

Earlier quoted context omitted.

I prefer the $ $ way, as it makes it possible to do inline equations, while keeping the source easily readable.

you can do both, the normal markdown way: `$a$` squared is `$a^2$`, which is good to know for the pythagorean theorem: ```equation a^2+b^2\eq c^2 ```

Ah yes, agreed, then that does indeed seem like to optimal solution here.

Re: Math on GitHub: The Good, the Bad and the Ugly

#12
> Its main advantage over MathJax is that it isn’t dead. Check out the repo activity on the two projects:

I know this is a common view, but this is such a strange mindset to me. Unless you add scope, a project is eventually just mostly done. It's not that MathJax has zero commits, it just has fewer. That _in itself_ isn't a bad sign to me. It could just mean it's a mature project.

Re: Math on GitHub: The Good, the Bad and the Ugly

#13

A 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.

Re: Math on GitHub: The Good, the Bad and the Ugly

#15
post #13

A 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.

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

#16
post #7

Earlier quoted context omitted.

I prefer the $ $ way, as it makes it possible to do inline equations, while keeping the source easily readable.

you can do both, the normal markdown way: `$a$` squared is `$a^2$`, which is good to know for the pythagorean theorem: ```equation a^2+b^2\eq c^2 ```

[deleted]

Re: Math on GitHub: The Good, the Bad and the Ugly

#17
Did 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 MJXTEX-I and GitHub’s default text Helvetica have a different x-height/cap-height ratio.

I don't understand how Github could launch this feature with this problem unaddressed. LaTeX isn't just about getting formulas right, it's about communicating ideas.

Re: Math on GitHub: The Good, the Bad and the Ugly

#18
post #17

Did 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

#19
The author fails to mention MathML as an alternative choice. The options aren’t just MathJax and KaTeX, but also raw MathML. MathML gives you extremely fast rendering, more font choices, copy-paste, a11y, etc. out of the box. The only downside is that Chrome is lagging behind in implementation, for that they could use MathJaX as a polyfill—as MathJax understands and is able to transform MathML—and allow Safari and Firefox users the benefits of using browsers that can render math natively.

Re: Math on GitHub: The Good, the Bad and the Ugly

#20
post #17

Did 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.

I agree that kerning is also a problem, and I also agree that it it can't practically be fixed.

However, even if it's theoretically possible to change the font size, would Github ever do so? My impression is that as an organization they place a high value on interface stability. Very little about how I interact with the site has ever changed.

I suppose that individual publishers might stick in a hack to increase the font size, but a bad default means that as a consumer, I'll be stuck looking at tiny math on Github for the vast majority of documents.

Post reply on HN