{{ message }}

Mathjax render conflits #93

Closed
opened this issue Jun 6, 2018 · 3 comments
Closed

Mathjax render conflits#93

opened this issue Jun 6, 2018 · 3 comments
Labels

Melody Information

Melody Version:

Platform: Ubuntu 18.04

Browser: Chrome

Expected behavior

I'm writng with mathjax on another website, and this is two pieces of code I write:

$\{0^n1^n\,|\,n \ge 1 \}$

\begin{align} S &\to \epsilon\, \\ S &\to 001A\,|\,00A1\,|0A01\,|\,A001 \\ S &\to 010A\,|\,01A0\,|0A10\,|\,A010 \\ S &\to 100A\,|\,10A0\,|1A00\,|\,A100 \\ \end{align}


They are rendered as:

This is my expected behavior, but not the case in melody.

Actual behavior

I found that I have to change all \{ to \\{, and all \\ to \\\\ to make melody works, which is believed to be a confilct between mathjax and markdown engine melody is using now.

Molunerfinn commented Jun 6, 2018

 Find a solution: https://www.npmjs.com/package/hexo-renderer-kramed And this is my test result: I think may be I need to update the docs.

upupming commented Jun 6, 2018

 This still not works(expected { wasn't rendered): $\{a = 0\}$ But this is okay: $$\{a = 0\}$$ kramed render suggests inline equations using this format, which is difficult to be compatible with the usual tex syntax: $\{a = 0\}$ I cannot find any better solution, so I will use   tag for inline equation.

Molunerfinn commented Jun 13, 2018 • edited

 @upupming To have MathJax on hexo is a hard work. Not only should the theme do some work to fit it, but also the hexo and the plugin of it need to fit it. Since I didn't write mathJax in my blog, may be I won't meet problem. May be someone has solved this problem, and I will appreciate it if he can give the project a PR~
mentioned this issue Jun 26, 2018