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
Mention Mmark math (MathJax/KaTeX) support in docs #1666
Comments
Create Use the discussion forum to ask questions. |
Here is my test. I ran the standard setup with hugo_0.15_linux_amd64.tar.gz on ubuntu14 as instructed here http://gohugo.io/overview/quickstart/ I created two files under 'content', about.md and about.mmark The documentation at http://gohugo.io/tutorials/mathjax/ suggests using the following for inline math
The documentation for "mmark" above suggests using the following for inline math
So I tried them both
Then I edited ../theme/hyde/layouts/partials/head.html as per the official documentation MathJax tutorial at http://gohugo.io/tutorials/mathjax/ (with the recommended javascript and CSS added to the bottom of head section) With the docs solution, it rendered as follows Then i removed the docs javascript solution. It rendered as follows So.. it appears the documented solution for Mathjax might break mmark paragraph math. And also a document written for .mmark format will have paragraph breaks if moved to .md. And it was always orange ( i tried putting the documented .css in many different places, never did figure that part out ) |
The orange thing is exquisite, but thanks for trying it all through. It looks like Mmark already can be employed just like its documentation says, without the extra javascript and backquotes, which could be added to current gohugo docs. |
I have found the reason for the orange thing. It is caused by css. See this to solve it. https://groups.google.com/forum/#!topic/mathjax-users/FgCBLdT15nM . |
@JimAmuro Thanks for sharing. |
I've been using GitLab Pages hosted Hugo with KaTeX over Mmark to great effect, it works like a charm, no hacks to setup. http://nosubstance.me/post/a-great-toolset-for-static-blogging/ |
Got Hugo working with Mmark and Mathjax. The only issue that came up was with display-mode equations and with references. The problem was the following from the Hugo docs:
This makes Mathjax interpret To fix use |
New docs take care of this (including the |
@rdwatters it fails to mention that Mmark is a whole alternative solution to all the hacks and fixes suggested in that page. Mmark simply works. From the modest mention one can think that the MathJax fixes are still necessary when using Mmark while in truth MathJax just works out of the box with it. |
I don't consider the "if you're using Mmark" short passage a solution to this issue at all... |
Are the Hugo docs intended to extol the virtues of Mmark, which is supported through an external helper, or is that a suggested documentation improvement for...Mmark? This is a legitimate question and not me being snide. I don't know enough about MathJax, which I had to throw into the new That said, I'd certainly appreciate a PR for suggested content revisions if you feel so passionately about it. Seriously: https://github.com/rdwatters/hugo-docs-concept [[EDIT]]: Not through an external helper. Oops. |
@rdwatters that section is a FAQ on MathJax and Mmark is just a dropin solution to many of the issues mentioned there, no need to extol, just mention that it's a solution that happens to be because gohugo ends up using its parser. Notice that I discovered this because I checked sources to know what parsers gohugo was actually using at the time. From the two I've seen I learned that Mmark was a Markdown superset that covered MathJax/KaTeX without need to worry about using divs and other fixes. One should learn that from Mmark parser docs indeed. Duplicating it in GoHugo FAQs is not the intention of the issue but just pointing that Mmark is a supported dialect in GoHugo and that it supports MathJax/KaTeX without issues, and how to activate the Mmark parser. |
@rdwatters also, AFAIK, the Mmark parser is built in to gohugo like the default parser, not an external helper that needs an external tool to be installed. |
@oblitum Excuse my ignorance on these matters. I re-opened this issue, but you can see the changes I've made to the upcoming docs here: |
@rdwatters that's fine but the it solves one of the issues, which is the mention of Mmark support, the other issue is that the section on MathJax has a subsection "Issues with Markdown", issues that don't apply when using Mmark because it covers MathJax already and as such is a natural solution to the "Issues with Markdown" presented there. |
@rdwatters relevant docs about that: https://github.com/miekg/mmark/wiki/Syntax#math-blocks. With the parser supporting this, there's no need to worry about the issues mentioned at "Issues with Markdown" and "Solution". |
And for users creating content with just markdown/BlackFriday rather than MMark and still using MathJax? Wouldn't they still run into the "Issues with Markdown?" |
Yes. Knowing that GoHugo supports a parser builtin where math is a non-issue may be useful information to math interested users. |
Thank your for all the feedback @oblitum. At this point, I think this is more than sufficient: https://hugodocs.info/content-management/formats/#issues-with-markdown |
@rdwatters Thanks for all additions. |
@oblitum My pleasure, brother. I appreciate your patience and expertise on this. Hopefully it drives some people to your blog as well 😄 Cheers! |
3f95a2ace Update merge function examples (#1662) e8d518011 requires -> require typo fix (#1666) e714066cb Update GitLab deployment instructions (#1661) 11946a218 update GitLab CI/CD yaml syntax (#1649) 3568ddc03 Add explicit `contentDir` to module-config-mounts (#1658) 798ac8f68 Add default value to isHTML d376565ce Create extensions.json git-subtree-dir: docs git-subtree-split: 3f95a2ace37b04851905d72e4444020e30996787
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. |
Duplicating discussion here, since it looks like feasible through Mmark, which has been adopted recently.
From Mmark README:
Is this already working? What are the steps to use Mmark and have this enabled?
If it's OK for being used, I guess the official hugo docs about MathJax support could be updated with this information.
If it's not working, I'd propose for the issue to keep open (in case it's not a "won't fix") to target enabling it for Mmark.
The text was updated successfully, but these errors were encountered: