News for hackers. Stuff that matters.
Re:Math on GitHub: The Good, the Bad and the Ugly by rectang on Saturday May 21, 2022 @10:04AM (#31458028)
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 by edflsafoiewq on Saturday May 21, 2022 @10:06AM (#31458054)
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 by nschloe on Sunday May 22, 2022 @07:10AM (#31466899)
Blog post author here. The kerning is probably a problem with their font config that can hopefully be fixed. I don't think -- and that's me personal estimation -- that people will write tons of `a\,=\,b` to work around the bad kerning, so that's a change I would still recommend making.
Re:Math on GitHub: The Good, the Bad and the Ugly by kmill on Monday May 23, 2022 @08:30AM (#31478132)
I thought kerning specifically referred to small adjustments in spacing between pairs of letters. This just seems to be a failure in honoring the spacing for the different TeX math mode symbol classes. The rel and op classes each have a certain amount of spacing they are supposed to have on either side (unless they aren't used as binary operators), and somehow this is broken in their implementation -- the spacing doesn't come from the font configuration.

For example, a\mathbin{foo}b is supposed to render as "a foo b", but on GitHub it comes out as "afoob".

When I looked at the MathJax configuration GitHub uses, nothing pops out as being odd. It would be funny if a minifier totally messed up the part of the MathJax source code specifically for this.

Re:Math on GitHub: The Good, the Bad and the Ugly by nschloe on Friday May 27, 2022 @03:24AM (#31526927)
It was actually a config issue that they fixed now. Some issues remains, but mostly on MathJax's side (e.g., https://github.com/mathjax/MathJax/issues/2877).
Re:Math on GitHub: The Good, the Bad and the Ugly by rectang on Saturday May 21, 2022 @10:22AM (#31458176)
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.

Re:Math on GitHub: The Good, the Bad and the Ugly by enw on Saturday May 21, 2022 @04:27PM (#31461497)
> Very little about how I interact with the site has ever changed.

GitHub tunes the UI all the time.

Re:Math on GitHub: The Good, the Bad and the Ugly by nschloe on Sunday May 22, 2022 @07:08AM (#31466891)
Author here.

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