mtn / cocoa-eh-hugo-theme

A enhanced version of Cocoa. Clean, fast, and responsive theme with cool typography.

Home Page:https://themes.gohugo.io/theme/cocoa-eh-hugo-theme/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A known issue with Mathjax may be need to remedy.

budui opened this issue · comments

There is a known issue with hugo when using Mathjax. Official documents show a way to remedy this problem.
By the way, I try to fix this problem by myself, but I found < in mathjax-markdown-solution.html which is showed in official documents has been escaped and mathjax doesn't work. Hope this helps.

Sorry, can you elaborate on that example? I remember reading that page, and I think it's not up to date.

I upload a test html in my cdn and this the markdown file
See file in my markdown editor :
screenshot from 2018-03-28 21-27-21

Hm, sorry for letting this stagnate @Jinxiapu. I think when I get a chance, I'm going to try out KaTeX, which is an alternate rendering system. I've heard good things about it, for awhile. Won't be getting to this for a bit, but wanted to give you an update.

There's some discussion about this on this issue. I tried out mmark, and it works as expected:

screen shot 2018-06-16 at 12 15 46 pm

with basically the same input file. For reference, you can find that input file here. Switching to .md immediately breaks things. In all cases, it seems like you can use $$ as your delimiter -- for non-inline, just don't put other text on the line.

Given how much easier working with mmark seems to be, I'm going to leave things the way they are and consider mmark the supported way to create files that must render latex. I'm happy to discuss if you disagree, but it's probably better for everyone's sanity to do it this way.

Lastly, I might try out KaTeX in the future, but am putting that off for now. If anyone desperately wants that, I'll make it a higher priority.

And thank you for making the issue!