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

博客内容带有latex数学公式时,启动失败 #16

Closed
4 tasks done
acptek opened this issue Sep 15, 2019 · 4 comments
Closed
4 tasks done

博客内容带有latex数学公式时,启动失败 #16

acptek opened this issue Sep 15, 2019 · 4 comments
Labels
🐞 Bug Something isn't working ☑ Verified Have Verified 🔌 3rd Party Service Third party service

Comments

@acptek
Copy link

acptek commented Sep 15, 2019

I want to create a new issue

Stun Information

Stun Version:
Stun Version: 1.4.1

Platform:
Windows

Browser:
Chrome

Expected behaviour

Start the Blog by excuting the command "hexo s", and then it renders the latex successfully.

Actual behaviour

The Blog startup failed.

(对于之前发布带有latex公式的博客,即使能在写完内容后本地启动博客,但是却无法渲染数学公式,本该显示公式的地方变为了空白)

Steps to reproduce the behaviour

  1. configure the mathjax according to the DOC
  2. set "math: true" in Front-matter
  3. write and save the blog
  4. excute command "hexo s"

I found the mistake related in thewebsite:
https://hexo.io/zh-cn/docs/troubleshooting.html

Feature Request


@liuyib liuyib added the 💬 Question Further information is requested label Sep 15, 2019
@liuyib
Copy link
Owner

liuyib commented Sep 15, 2019

你好,麻烦提供下你的 Hexo 根目录下的 package.json 中的内容和你的文章 Markdown 源文件中有关 LaTex 公式那块的截图。还有,请问数学公式的渲染引擎你选择的是 MathJax 还是 KaTex?

@acptek
Copy link
Author

acptek commented Sep 15, 2019

package.json :

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.9.0"
  },
  "dependencies": {
    "gitalk": "^1.5.0",
    "hexo": "^3.9.0",
    "hexo-algolia": "^1.3.1",
    "hexo-blog-encrypt": "^2.2.4",
    "hexo-deployer-git": "^1.0.0",
    "hexo-generator-archive": "^0.1.5",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^1.2.2",
    "hexo-generator-index-pin-top": "^0.2.2",
    "hexo-generator-searchdb": "^1.0.8",
    "hexo-generator-tag": "^0.2.0",
    "hexo-renderer-ejs": "^0.3.1",
    "hexo-renderer-kramed": "^0.1.4",
    "hexo-server": "^0.3.3",
    "hexo-wordcount": "^6.0.1"
  },
  "devDependencies": {
    "hexo-render-pug": "^2.1.4",
    "hexo-renderer-stylus": "^0.3.3"
  }
}

Latex :

$$
\begin{align}\textbf{特殊正交群}:\\&SO(n)=\{R\in\R^{n\times n}|RR^T=I,det(R)=1\}.\end{align}
$$
其中,I为单位矩阵

关于${a}'=R^{-1}a=R^Ta$ ,同样地,正交矩阵R的逆矩阵在几何上表示一个相反的旋转,因此R的转置刻画了一个相反的旋转。



#### 旋转 + 平移

刚体运动(由向量a变换到向量a'),旋转Ra和平移向量t
$$
\textbf{a'=Ra+t}
$$

选择的是 mathjax

@acptek
Copy link
Author

acptek commented Sep 15, 2019

非常感谢,关于不能启动的问题我已解决:
在书写latex时,将 "{{"写成 "{ {"可以避免报错

但是关于页面公式无法显示的问题依然存在

@liuyib liuyib added 🚧 Work in Progress Work in progress 🐞 Bug Something isn't working ☑ Verified Have Verified labels Sep 15, 2019
liuyib added a commit that referenced this issue Sep 16, 2019
@liuyib
Copy link
Owner

liuyib commented Sep 16, 2019

问题已解决,commit 记录:fix(#16): Solved that mathjax is not working properly
我这边测试没问题了,效果如下:
snipaste20190916084036

你更新下主题应该就可以正常使用了。如果还有问题,可以再接着提问;如果没问题了,就把 Issue 关闭吧 😄。

@acptek acptek closed this as completed Sep 16, 2019
@liuyib liuyib added 🔌 3rd Party Service Third party service and removed 🚧 Work in Progress Work in progress 💬 Question Further information is requested labels Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working ☑ Verified Have Verified 🔌 3rd Party Service Third party service
Projects
None yet
Development

No branches or pull requests

2 participants