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 formula rendering error #2064

Closed
scjiaer opened this Issue Jul 27, 2016 · 4 comments

Comments

4 participants
@scjiaer

scjiaer commented Jul 27, 2016

Environment Info

Node version(node -v)

v4.4.7

Plugin version(npm ls --depth 0)

├── hexo@3.2.2
├── hexo-deployer-git@0.2.0
├── hexo-generator-archive@0.1.4
├── hexo-generator-category@0.1.3
├── hexo-generator-index@0.2.0
├── hexo-generator-tag@0.2.0
├── hexo-renderer-ejs@0.2.0
├── hexo-renderer-marked@0.2.11
├── hexo-renderer-stylus@0.3.1
└── hexo-server@0.2.0

Hi, when I use MathJax and Hexo to display the following formula, but it failed.

$EI=\{{EI}_1,{EI}_2,\cdots,{EI}_V\}$ 

The error message are as follows. I'm new to Hexo and I wonder if this may be something wrong to render symbols like \{ or \}. So I tried these formulas, e.g. $\mathbf{W}^{'}=\{w^{'}_{ij}\}$ and $\{w_{I,1},w_{I,2},\cdots,w_{I,C}\}$, they are just OK. The solution of this problem is to replace \[/\} with \lbrace/\rbrace.() I just want to know if it is a BUG with Hexo. Thank you.

FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: (unknown path) [Line 1, Column 10]
  expected variable end
    at Object.exports.prettifyError (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/nunjucks/src/lib.js:34:15)
    at Obj.extend.render (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/nunjucks/src/environment.js:468:27)
    at Obj.extend.renderString (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/nunjucks/src/environment.js:326:21)
    at /home/jiaer/hexo/blog/node_modules/hexo/lib/extend/tag.js:66:9
    at Promise._execute (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/debuggability.js:272:9)
    at Promise._resolveFromExecutor (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:475:18)
    at new Promise (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:77:14)
    at Tag.render (/home/jiaer/hexo/blog/node_modules/hexo/lib/extend/tag.js:64:10)
    at Object.tagFilter [as onRenderEnd] (/home/jiaer/hexo/blog/node_modules/hexo/lib/hexo/post.js:253:16)
    at /home/jiaer/hexo/blog/node_modules/hexo/lib/hexo/render.js:65:19
    at tryCatcher (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:504:31)
    at Promise._settlePromise (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:561:18)
    at Promise._settlePromise0 (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:606:10)
    at Promise._settlePromises (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:685:18)
    at Async._drainQueue (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
FATAL (unknown path) [Line 1, Column 10]
  expected variable end
Template render error: (unknown path) [Line 1, Column 10]
  expected variable end
    at Object.exports.prettifyError (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/nunjucks/src/lib.js:34:15)
    at Obj.extend.render (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/nunjucks/src/environment.js:468:27)
    at Obj.extend.renderString (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/nunjucks/src/environment.js:326:21)
    at /home/jiaer/hexo/blog/node_modules/hexo/lib/extend/tag.js:66:9
    at Promise._execute (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/debuggability.js:272:9)
    at Promise._resolveFromExecutor (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:475:18)
    at new Promise (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:77:14)
    at Tag.render (/home/jiaer/hexo/blog/node_modules/hexo/lib/extend/tag.js:64:10)
    at Object.tagFilter [as onRenderEnd] (/home/jiaer/hexo/blog/node_modules/hexo/lib/hexo/post.js:253:16)
    at /home/jiaer/hexo/blog/node_modules/hexo/lib/hexo/render.js:65:19
    at tryCatcher (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:504:31)
    at Promise._settlePromise (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:561:18)
    at Promise._settlePromise0 (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:606:10)
    at Promise._settlePromises (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:685:18)
    at Async._drainQueue (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/jiaer/hexo/blog/node_modules/hexo/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

MathJax verison

MathJax: 2.6.1

Other Info

hexo: 3.2.2
hexo-cli: 1.0.2
os: Linux 3.19.0-25-generic linux x64
http_parser: 2.5.2
node: 4.4.7
v8: 4.5.103.36
uv: 1.8.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2h
@scjiaer

This comment has been minimized.

scjiaer commented Jul 28, 2016

And this formula1+e^{{\mathbf{v}_{w_j}^{'}}^{T}} also failed. So I guess there is something wrong with parsing symbols like {{. The solution is to separate the two {, e.g. put an space between them.

@estebancito

This comment has been minimized.

estebancito commented Jul 28, 2016

Gracias por ponerte en contacto conmigo, pronto revisaré este mensaje y te contestaré. Un abrazo

Esteban Alvarez

@stale stale bot added the wontfix label Sep 27, 2017

@jdhao

This comment has been minimized.

jdhao commented Oct 24, 2017

For anyone who comes latter.
I have also met this issue. I have also verified that if you write two consecutive curly braces in your LaTeX equation without space, then it will produce the above error messages.

@NoahDragon

This comment has been minimized.

Member

NoahDragon commented Nov 8, 2017

This a known issue with nunjucks hexo using for tag/filters.

@NoahDragon NoahDragon closed this Nov 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment