Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

warning An error was encountered in plugin "vuepress-plugin-mathjax" #28

Open
mathieunicolas opened this issue May 25, 2020 · 6 comments

Comments

@mathieunicolas
Copy link

Hello !

I don't understand why, but I simply added the plugin in the dependancies, added the plugin in the config.js file, and when running vuepress dev or build I got this message :

warning An error was encountered in plugin "vuepress-plugin-mathjax"

I don't know why, nor what I can do, it's the last vuepress version and I run it on a fresh install... clueless I am ! Thanks for helping, because I'm stuck with this one !

@davidjpramsay
Copy link

Can someone confirm if this plugin is still working? I am having the same issue as the OP.

@apcamargo
Copy link

apcamargo commented Jul 14, 2020

I'm having the same issue. I'm now using @maginapp/vuepress-plugin-katex.

@jlin-vt
Copy link

jlin-vt commented Jul 29, 2020

I have same issue.

@cespon
Copy link

cespon commented Sep 6, 2020

Same error here.

@foxdie987
Copy link

foxdie987 commented Oct 27, 2021

I'm having the same issue. I'm now using @maginapp/vuepress-plugin-katex.

I can't make this plugin work and got the same error like mathieunicolas, so I'm using vuepress-plugin-katex too and now the maths are showing properly.
As seen here
However, KaTeX can't be fully replace mathjax (LaTeX) though, because I've encountered some problem with syntax and extra redundant { } brackets from convert MathType -> LaTeX, and that will stop your (vuepress build) with some red errors, until you clean the formula of extra { } brackets.

There is no option to convert directly MathType to KaTeX, as far as I know. If anyone is an expert of this, please let me know.

@daviddekoning
Copy link

Hi all, I wanted to share another method to get MathJax working in Vuepress. After spending an evening struggling to update this plugin to MathJax 3.2 (the current latest version), I found out that you can tell VuePress to use markdown-it extensions:

  1. npm install -D markdown-it-mathjax3
  2. add the following to your config.js
    extendMarkdown: md => {
      md.use(require('markdown-it-mathjax3'), { tex: {tags: 'ams'}})
    }
  }

This fixed a number of bugs I found, including:

  1. single character in-line equations showing up as display
  2. aligned sets of equations not working
  3. matrices not working

VitePress also uses markdown-it, so I suspect this method will work there as well (but I haven't checked)

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

No branches or pull requests

7 participants