Hacker Newsnew | past | comments | ask | show | jobs | submit | welpo's commentslogin


> That said, I do use KaTeX with client-side rendering on a limited number of pages that have mathematical content

You could try replacing KaTeX with MathML: https://w3c.github.io/mathml-core/


> You could try replacing KaTeX with MathML: https://w3c.github.io/mathml-core/

I would love to use MathML, not directly, but automatically generated from LaTeX, since I find LaTeX much easier to work with than MathML. I mean, while I am writing a mathematical post, I'd much rather write LaTeX (which is almost muscle memory for me), than write MathML (which often tends to get deeply nested and tedious to write). However, the last time I checked, the rendering quality of MathML was quite uneven across browsers, both in terms of aesthetics as well as in terms of accuracy.

For example, if you check the default demo at https://mk12.github.io/web-math-demo/ you'd notice that the contour integral sign has a much larger circle in the MathML rendering (with most default browser fonts) which is quite inconsistent with how contour integrals actually appear in print.

Even if I decide to fix the above problem by loading custom web fonts, there are numerous other edge cases (spacing within subscripts, sizing within subscripts within subscripts, etc.) that need fixing in MathML. At that point, I might as well use full KaTeX. A viable alternative is to have KaTeX or MathJaX generate the HTML and CSS on server-side and send that to the client and that's what I meant by server-side rendering in my earlier comment.


Math expressions are like regex to me nowadays. I ask the llm coding assistant to write it and it’s very very good at it. I’ll probably forget the syntax soon but no big deal.

“MathML for {very rough textual form of the equation}” seems to give a 100% hit rate for me. Even when i want some formatting change i can ask the llm and that pretty much always has a solution (mathml can render symbols and subscripts in numerous ways but the syntax is deep). It’ll even add the css needed to change it up in some way if asked.


Katex renders to MathML (either server side or client side). Generally people want a slightly more fluent way of describing an equation than is permitted by a soup of html tags. The various tex dialects (generally just referred to as latex) are the preferred methods of doing that.


Server side rendering would cut out the 277kb library. The additional MathML being sent to the client is probably going to be a fraction of that.


If you want to test out some examples from your website to see how they'd look in KaTeX vs. browser MathML rendering, I made a tool for that here: https://mk12.github.io/web-math-demo/


Nice tool! Seems "New Computer Modern" font is the Native MathML rendering that looks closest like standard LaTeX rendering, I guess cause LaTeX uses Computer Modern by default. But I notice extra space around the parenthesis, which annoys me because LaTeX math allows you to be so precise about how wide your spaces (e.g. \, \: \; \!). Is there a way to get the spaces around the parenthesis to be just as wide as standard LaTeX math? And the ^ hat above f(x) isn't nicely above just the top part of the f.


Assuming you’re seeing the same issue as me: I find the parenthesis spacing is messed up whenever there are unnecessary \left and \right, as there are in some of the samples, which leads to an extra <mrow> in the MathML. If you only use those when they really need to stretch, then it looks much better.


Thanks, the special \left and \right parenthesis were indeed the culprit.


I'm trying to create the best A/B test sample size & duration calculator: https://calculator.osc.garden/

It's free (https://github.com/welpo/ab-test-calculator), and it has no dependencies (vanilla JS + HTML + CSS).

Right now it only supports binary outcomes. Even with the current limitations, I feel it's way above many/most online calculators/planners.


On the third point (peeking at p-values), I created an A/A test simulator that compares peeking vs not peeking in terms of false positive rate: https://stop-early-stopping.osc.garden/


Why post AI comments?


Probably growing plausible-seeming accounts for later use in astroturfing.


Yes, the International Standard Recording Code (ISRC): https://en.wikipedia.org/wiki/International_Standard_Recordi...

I don't know how to look up music with a known ISRC, though.


I'm a happy Zola [0] user, which does everything you mentioned except LaTeX.

There are a few themes [1], though I ended up writing my own [2] (which supports MathJax [3] for mathematical notation).

[0]: https://www.getzola.org/

[1]: https://www.getzola.org/themes/

[2]: https://github.com/welpo/tabi

[3]: https://www.mathjax.org/


I use characters from books I've enjoyed.


When I read "Taras", the first thing that comes to mind is Nikolai Gogol's "Taras Bulba": https://en.wikipedia.org/wiki/Taras_Bulba

Not sure it's related, but (spoiler) Taras Bulba's ending isn't pretty (and he is of Ukranian origin).


And now, 30 years later, the name of this Disney character finally makes sense to me: https://disney.fandom.com/wiki/Taurus_Bulba


Exactly. I just don’t see Russian disinformation agents using it out of respect of Gogol. Unless we take the idea of fighting against Poles, representing the West, from Taras Bulba?


/bɹʌv/


How do you notate that the v is aspirated? It's practically an f


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: