Skip to content
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

MathJax have no effect #1774

Closed
SummerLiu95 opened this issue Jul 21, 2017 · 8 comments
Closed

MathJax have no effect #1774

SummerLiu95 opened this issue Jul 21, 2017 · 8 comments

Comments

@SummerLiu95
Copy link

SummerLiu95 commented Jul 21, 2017

Expected behavior (预期行为)

I am using the Typora Markdown local editor, his grammar is to comply with the GFM standard, I wrote the latex formula in the editor, the local editor shows the correct result!

typoa

latex

Actual behavior (实际行为)

But the formula can not be displayed on the web page
default

Steps to reproduce the behavior (重现步骤)

NexT Information

Add the ✔ sign before an item which is affected by this behavior.

NexT Version:

  • Master
    ✔- Latest Release
  • Old version -

NexT Scheme:

  • All schemes
    ✔ - Muse
  • Mist
  • Pisces

Other Information (Like Browser, System, Screenshots)

When the beginning of the problem, I first looked at other people's issues, found that the problem is quite common, and the reasons for a variety of. I started to see #1154, I used their method, but found no effect. I uninstalled the kramed plugin and reused the hexo's rendering engine. Later, some people say that the default mathjax cdn has been invalid, I changed a cdn. Anyway, try a lot of ways, but do not know where the problem lies

here is my theme's config.yml
mathjax

@SummerLiu95 SummerLiu95 changed the title MathJax没有起作用 MathJax没有起作用 MathJax have no effect Jul 21, 2017
@SummerLiu95 SummerLiu95 changed the title MathJax没有起作用 MathJax have no effect MathJax have no effect Jul 22, 2017
@SummerLiu95
Copy link
Author

Please I need a help!

@ivan-nginx
Copy link
Collaborator

@BarryLiu1995 can u check #1672? Mb, it can help.

@SummerLiu95
Copy link
Author

@ivan-nginx This is not the problem

@ivan-nginx
Copy link
Collaborator

@BarryLiu1995 may be u right, but anyway i think what problem is not in Next theme.
Theme Next - it's just templates and styles with some javascripts engines.
Mathjax - it's third party javascript and not Next maintenance it. And as markdown engine too.
It seems, problem in markdown engine in compilation with mathjax or any third-party plugins, what directly support markdown and/or Hexo. And i really don't know about mathjax and how it work, but u may also try to research in our issues by this link or ask in MathJax | Markdown | NodeJS issues. Next it's just template, u must know and understand it.

@SummerLiu95
Copy link
Author

@ivan-nginx Ok, I got it. I will try to fix my problem by myself.

@ivan-nginx
Copy link
Collaborator

ivan-nginx commented Jul 23, 2017

@BarryLiu1995 i don't know what this is, but see - it's working:
In _config.yml:

# MathJax Support
mathjax:
  enable: true
  per_page: false
  cdn: //cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML

In *.md file:

## MathJax fast test

$$lim_{1\to+\infty}P(|\frac{1}{n}\sum_i^nX_i-\mu|<\epsilon)=1, i=1,...,n$$

image

@SummerLiu95
Copy link
Author

@ivan-nginx I change Front-matter like this and it work
g

@huyingjie
Copy link

huyingjie commented Sep 13, 2017

这个帖子里有提到解决方法 (This post has a solution)

try to replace default with
//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML

最后的代码是 (final code)

mathjax:
  enable: true
  per_page: true
  #cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
  cdn: //cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants