matcornic / hugo-theme-learn

Porting Grav Learn theme to Hugo
https://learn.netlify.com/en/
MIT License
1.6k stars 1.28k forks source link

Katex Math #358

Open drnazmul opened 4 years ago

drnazmul commented 4 years ago

Hi, I like the theme to use for writing math equations. Could you please add the Katex math option? Thanks.

NicTanghe commented 4 years ago

I dont care how you add math but you must seriously add math. plz children wil die by failing classes if you don`t add math.

NicTanghe commented 4 years ago

@matalo33 hello what sort of help do you need to get this up and running i wil research this until the internet inplodes just tel mr what to research.

matalo33 commented 4 years ago

Heya. There's been a few different mentions of math support. I think the first thing to do is discuss which is most suitable to use in hugo and this theme. mathjax, katex, etc.

I've never used any similar library myself, could do with seeing some conversation on which is better, and why

NicTanghe commented 4 years ago

it's probably all about the same from the users' perspective you type stuf and pretty math apears. Then its just what bindings you learned.

since i have not learned anny bindings id say katex is good if you can find a way to implement it. I havent hower checked if actually can do everything i just assume it can becouse its a latex derivative.

So you're probably best of picking whatever is easiest to implement with whatever you`re using for markdown support.

https://www.intmath.com/cg5/katex-mathjax-comparison.php?processor=MathJax3

Bertbk commented 4 years ago

@matalo33 I would go for MathJax v3: way faster than v2, it proposes much more "packages" than KaTeX and handle equation numbering and cross-references which KaTeX doen't (really) do. And \newcommand{}{} can be used just as in LaTeX (in KaTeX, it's different).

MathJax v3 still has some open issues but I'm pretty confident they will be fixed soon.

I used it with the academic them (now wowchemy) and I'm very happy with it.