-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider markdown extensions for math typesetting in Hugo #6544
Comments
The lack of support for maths typesetting with Goldmark (and specifically with using KaTeX to render it) is currently stopping me from dropping mmark. If it's not too difficult/time consuming, I may be able to take a stab at writing an extension for KaTeX. Although, I have next to no experience with Go. |
This commit will be reverted once gohugoio/hugo#6544 is resolved.
However note that the Themes Showcase will be using Blackfriday as its default Markdown renderer, until the situation with Math Typesetting described gohugoio/hugo#6544 is resolved.
I have just come across a KaTex extension for Goldmark. https://github.com/graemephi/goldmark-qjs-katex As mentioned in the first post there is another for MathJax over here: Related: cc: @bep |
Would be nice to have a rationale for this here. I came here from build warning and have no idea why of the deprecation, as Mmark coupled with KaTeX has been working great for me and I use it in all of my posts.... |
@oblitum The release notes for 0.60.0 provide all the rationale you request. Also the former default Blackfriday is largely unmaintained. mmark decided to switch to another Markdown engine that unfortunately came with its own performance penalties. So in the end it was decided that Goldmark which is Commonmark compliant should be adopted. |
Proper KaTeX and/or mathjax support by hugo would be huge. So far I always had to resort to various hacky solutions that never lasted without breaking in one way or another. |
Well this sucks and I used to recommend Mmark for math savvy hugo bloggers (it's a great and simple solution that works), I hope they don't come hunting me now, I made a dozen of people adopt it. |
@onedrawingperday I checked the release notes and it doesn't state anything regarding why remove Mmark, the point there is more about the default parser Blackfriday being substituted, which by the way is less critical in thesis, as people that were relying on Blackfriday weren't relying on math extensions, etc, just standard Markdown which is covered by CommonMark. I never relied on Blackfriday as it never supported the features I needed, specially for math, so it was great when I found out about Mmark support. Is it really necessary, as you're going to break everyone that's relying on Mmark extensions for a solution that solves CommonMark? Couldn't it keep supporting Mmark just like before, in dual mode, with a new default Markdown parser being replaced and optional Mmark at user option? |
@jemus42 it has always worked in Hugo if you used See #1666 for example. |
@oblitum This issue is about tracking the addition of Math extensions in Hugo. We are not going to have a discussion here. Also note that currently as shown in my status I am BUSY. Please respect that fact and do not mention my username any further. |
Which have been available and working since circa 2015. |
I am closing this issue due to trolling. If someone else wishes to track the development of Math Typesetting extensions feel free to open another issue. Enough already. cc: @bep |
I'm not sure I've understood what's the current state of math typesetting using Hugo. Do we have a working alternative right now that does not imply changing Hugo's source code ourselves or not? (The above Goldmark extensions appears to require such changes for now) I see that pandoc has the Edit: Or wasn't actually server-side KaTeX already implemented in #6842 and works with Goldmark out of the box? I'll try it and come back :) |
#6842 (adding the graemephi/goldmark-qjs-katex extension) couldn't be merged because (from my layman's understanding) the katex extension in question includes a dependency on C (cgo), which is... a problem? At least there's a "no cgo rule", as the PR discussion shows. Therefore: No goldmark-katex extension for the foreseeable future (at least not this one). As far as pandoc is concerned: From what I understand the pandoc support / configuration options form the hugo side are fairly limited, meaning you can use |
At the moment, it doesn't seem inline math works with the combination of Katex and goldmark. The only way to get it to work in my case was with this workaround of using mmark: |
@davidvandebunte I got it work after tweaking the delimiters https://stackoverflow.com/questions/27375252/how-can-i-render-all-inline-formulas-in-with-katex see https://github.com/KevCaz/funkyflex/blob/master/layouts/partials/math.html |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Since the release of Hugo 0.60.0 the new default markdown library is Goldmark and mmark is deprecated and going to be removed at some point.
I am opening this issue to track the matter of math typesetting in Hugo with the new default markdown library.
The present situation is like so:
https://github.com/litao91/goldmark-mathjax is an extension that offers support for goldmark.
Currently there is no KaTex extension that offers support for goldmark. (ref: yuin/goldmark#32 )
The text was updated successfully, but these errors were encountered: