Skip to content

MathJax have no effect #1774

@SummerLiu95

Description

@SummerLiu95

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

Activity

changed the title [-]MathJax没有起作用[/-] [+]MathJax没有起作用 MathJax have no effect[/+] on Jul 21, 2017
changed the title [-]MathJax没有起作用 MathJax have no effect[/-] [+]MathJax have no effect[/+] on Jul 22, 2017
SummerLiu95

SummerLiu95 commented on Jul 22, 2017

@SummerLiu95
Author

Please I need a help!

ivan-nginx

ivan-nginx commented on Jul 22, 2017

@ivan-nginx
Collaborator

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

SummerLiu95

SummerLiu95 commented on Jul 23, 2017

@SummerLiu95
Author

@ivan-nginx This is not the problem

ivan-nginx

ivan-nginx commented on Jul 23, 2017

@ivan-nginx
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

SummerLiu95 commented on Jul 23, 2017

@SummerLiu95
Author

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

ivan-nginx

ivan-nginx commented on Jul 23, 2017

@ivan-nginx
Collaborator

@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

SummerLiu95 commented on Jul 24, 2017

@SummerLiu95
Author

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

huyingjie

huyingjie commented on Sep 13, 2017

@huyingjie

这个帖子里有提到解决方法 (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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @huyingjie@ivan-nginx@SummerLiu95

        Issue actions

          MathJax have no effect · Issue #1774 · iissnan/hexo-theme-next