日损录

Feilishu's Note


  • 首页

  • 关于

  • 标签

  • 分类

  • 归档

Next主题使用Mathjax引擎书写LaTex数学公式

发表于 2017-12-01 | 分类于 IT , Blog

MathJax 支持配置

在Next主题配置文件_config.yml中,找到mathjax配置段,将enable开关打开,但per_page开关建议不要打开,每个文件都加载mathjax引擎影响速度。

1
2
3
4
mathjax:
enable: true
per_page: false
cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML

在需要书写数学公式的页面的Fromt-Matter中打开mathjax开关即可。

1
2
3
title: Next主题使用Mathjax引擎书写LaTex数学公式
date: :year/:month/:day
mathjax: true

Mathjax引擎渲染数学公式举例:

$$ S = \pi r^2 $$

Mathjax引擎渲染为:$$ S = \pi r^2 $$

$$ f = \Sigma_1^{100} x $$

Mathjax引擎渲染为:$$ f = \Sigma_1^{100} x $$

1
2
3
4
5
6
7
8
$$
\begin {pmatrix}
1 & a_1 & a_1^2 & \cdots & a_1^n \\
1 & a_2 & a_2^2 & \cdots & a_2^n \\
\vdots & \vdots& \vdots & \ddots & \vdots \\
1 & a_m & a_m^2 & \cdots & a_m^n
\end {pmatrix}
$$

Mathjax引擎渲染为:
$$
\begin{pmatrix}
1 & a_1 & a_1^2 & \cdots & a_1^n \
1 & a_2 & a_2^2 & \cdots & a_2^n \
\vdots & \vdots& \vdots & \ddots & \vdots \
1 & a_m & a_m^2 & \cdots & a_m^n
\end{pmatrix}
$$

为什么不换行?????!!!!
好大一个大坑,原因是Markdown中\是转义符号,LaTex公式中的\\换行符,必须再重复一遍,输入\\\\才能得到\\。

所以:

1
2
3
4
5
6
7
8
$$
\begin{pmatrix}
1 & a_1 & a_1^2 & \cdots & a_1^n \\\\
1 & a_2 & a_2^2 & \cdots & a_2^n \\\\
\vdots & \vdots& \vdots & \ddots & \vdots \\\\
1 & a_m & a_m^2 & \cdots & a_m^n
\end{pmatrix}
$$

Mathjax引擎才能渲染为:
$$
\begin{pmatrix}
1 & a_1 & a_1^2 & \cdots & a_1^n \\
1 & a_2 & a_2^2 & \cdots & a_2^n \\
\vdots & \vdots& \vdots & \ddots & \vdots \\
1 & a_m & a_m^2 & \cdots & a_m^n
\end{pmatrix}
$$

问题解决了,感觉非常爽,是不是?

Hexo Front-matter介绍

发表于 2017-11-30 | 分类于 IT , Blog

Front-matter

Front-matter是文件最上方以 — 分隔的区域,用于指定个别文件的变量,举例来说:

title: Hello World
date: 2013/7/13 20:46:25
-–

阅读全文 »

Hello World

发表于 2017-11-29

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

12

Feilishu

为学日益,为道日损,损之又损,以至于无为,无为而无不为。取天下常以无事,及其有事,不足以取天下。

13 日志
10 分类
11 标签
RSS
© 2017 — 2018 Feilishu
由 Hexo 强力驱动
|
主题 — NexT.Gemini v5.1.3