关于 \newcommand 的问题
Alpha1022 opened this issue · 1 comments
Alpha1022 commented
如果我写
$$
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\type}{\text{type}}
\newcommand{\ffrac}[2]{\left\lfloor\frac{#1}{#2}\right\rfloor}
\prod_{i=1}^{A}\prod_{j=1}^{B}\prod_{k=1}^{C}\left(\frac{\lcm(i,j)}{\gcd(i,k)}\right)^{f(\type)} = \prod_{i=1}^{A}\prod_{j=1}^{B}\prod_{k=1}^{C}\left(\frac{ij}{\gcd(i,j)\gcd(i,k)}\right)^{f(\type)}
$$
的话会报错为
$ hexo g
INFO Start processing
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: (unknown path)
Error: expected end of comment, got end of file
at Object._prettifyError (D:\blog\node_modules\nunjucks\src\lib.js:36:11)
at Template.render (D:\blog\node_modules\nunjucks\src\environment.js:526:21)
at Environment.renderString (D:\blog\node_modules\nunjucks\src\environment.js:364:17)
at D:\blog\node_modules\hexo\lib\extend\tag.js:62:48
at tryCatcher (D:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Function.Promise.fromNode.Promise.fromCallback (D:\blog\node_modules\bluebird\js\release\promise.js:180:30)
at Tag.render (D:\blog\node_modules\hexo\lib\extend\tag.js:62:18)
at Object.onRenderEnd (D:\blog\node_modules\hexo\lib\hexo\post.js:282:20)
at D:\blog\node_modules\hexo\lib\hexo\render.js:65:19
at tryCatcher (D:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\blog\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (D:\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\blog\node_modules\bluebird\js\release\promise.js:694:18)
at _drainQueueStep (D:\blog\node_modules\bluebird\js\release\async.js:138:12)
at _drainQueue (D:\blog\node_modules\bluebird\js\release\async.js:131:9)
at Async._drainQueues (D:\blog\node_modules\bluebird\js\release\async.js:147:5)
at Immediate.Async.drainQueues (D:\blog\node_modules\bluebird\js\release\async.js:17:14)
at processImmediate (internal/timers.js:456:21)
删掉 \newcommand
然后手动替换就可以了?请问如何解决?
Alpha1022 commented
解决了,貌似是 {#
的问题,加个空格就好了