Markdown语法
基础标题+字体样式
# 一级标题
## 二级标题
以此类推
加粗字体 **加粗字体**
斜体字体 *斜体字体*
斜体加粗 ***斜体加粗***
删除线 ~~删除线~~
荧光笔 <mark>荧光笔</mark>
半 角 空 格 半 角 空 格
全 角 空 格 全 角 空 格
无序、有序列表
无序列表1 * 无序列表1
无序列表2 * 无序列表2
无序列表3 * 无序列表3
无序列表4 * 无序列表4
有序列表1 1. 有序列表1
有序列表2 2. 有序列表2
有序列表3 3. 有序列表3
有序列表4 4. 有序列表4
建表
表头
左对齐
居中
右对齐
单元格
单元格
单元格
单元格
单元格
单元格
单元格
单元格
1 2 3 4 | 表头 | 左对齐 | 居中 | 右对齐 | | - | :- | :-: | -: | | 单元格 | 单元格 | 单元格 | 单元格 | | 单元格 | 单元格 | 单元格 | 单元格 |
超链接
[想要显示的链接名](目标网址)
示例
点这里下载Anaconda [点这里下载Anaconda](https://www.anaconda.com/download)
图片
有关abbrlink的拓展
第一次使用的用户用如下命令安装
1 $ npm install hexo-abbrlink --save
在_config.yml中修改相关内容为如下
1 2 3 4 5 6 7 # URL ## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' url: 博客的地址,一般为https://"Github用户名".github.io permalink: p/:abbrlink.html abbrlink: alg: crc32 # 算法:crc16(default) and crc32 rep: hex # 进制:dec(default) and hex
添加图片到正文
一般使用如下命令新建一篇文章
则会在路径/source/_posts下生成一篇年-月-日-标题.md以及名为年-月-日-标题的文件夹
把想要插入的图片存放于该文件夹中,并使用如下命令

示例

Katex语法
我使用的是Next主题,如何安装可以参考这里
将_config.next.yml中的相关片段修改为
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 # --------------------------------------------------------------- # Math Formulas Render Support # See: https://theme-next.js.org/docs/third-party-services/math-equations # Warning: Please install / uninstall the relevant renderer according to the documentation. # Server-side plugin: https://github.com/next-theme/hexo-filter-mathjax # --------------------------------------------------------------- math: # Default (false) will load mathjax / katex script on demand. # That is it only render those page which has `mathjax: true` in front-matter. # If you set it to true, it will load mathjax / katex script EVERY PAGE. every_page: false mathjax: enable: false # Available values: none | ams | all tags: none katex: enable: true # See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex copy_tex: true
并将如下代码复制到你的文章.md中<!-- less -->或者<!-- more -->后面
1 2 3 4 5 6 7 8 9 10 11 <head> <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'], inlineMath: [['$','$']] } }); </script> </head>
在2个$之间增加指令,就可以实现行间数学模式,与正文不冲突
在2个$$之间增加指令,将公式居中显示的单独模块
个人常用字符
希腊字母
效果
指令
效果
指令
α \alpha α
\alpha
σ \sigma σ
\sigma
β \beta β
\beta
τ \tau τ
\tau
γ \gamma γ
\gamma
Γ \Gamma Γ
\Gamma
δ \delta δ
\delta
Δ \Delta Δ
\Delta
ϵ \epsilon ϵ
\epsilon
ψ \psi ψ
\psi
ζ \zeta ζ
\zeta
ω \omega ω
\omega
η \eta η
\eta
Ω \Omega Ω
\Omega
θ \theta θ
\theta
Θ \Theta Θ
\Theta
λ \lambda λ
\lambda
ϕ \phi ϕ
\phi
μ \mu μ
\mu
φ \varphi φ
\varphi
π \pi π
\pi
ξ \xi ξ
\xi
ρ \rho ρ
\rho
箭头
样例
指令
样例
指令
← \leftarrow ←
\leftarrow
⇐ \Leftarrow ⇐
\Leftarrow
→ \rightarrow →
\rightarrow
⇒ \Rightarrow ⇒
\Rightarrow
↔ \leftrightarrow ↔
\leftrightarrow
⇔ \Leftrightarrow ⇔
\Leftrightarrow
↑ \uparrow ↑
\uparrow
↦ \mapsto ↦
\mapsto
↓ \downarrow ↓
\downarrow
⇌ \rightleftharpoons ⇌
\rightleftharpoons
运算符
样例
指令
样例
指令
× \times ×
\times
∧ \wedge ∧
\wedge
÷ \div ÷
\div
∨ \vee ∨
\vee
∩ \cap ∩
\cap
⊕ \oplus ⊕
\oplus
∪ \cup ∪
\cup
⊗ \otimes ⊗
\otimes
⋅ \cdot ⋅
\cdot
⋯ \cdots ⋯
\cdots
关系符
样例
指令
样例
指令
≠ \neq =
\neq
⊂ \subset ⊂
\subset
≤ \leq ≤
\leq
⊆ \subseteq ⊆
\subseteq
≥ \geq ≥
\geq
≈ \approx ≈
\approx
≪ \ll ≪
\ll
≡ \equiv ≡
\equiv
≫ \gg ≫
\gg
≅ \cong ≅
\cong
≺ \prec ≺
\prec
∥ \parallel ∥
\parallel
≻ \succ ≻
\succ
⊥ \perp ⊥
\perp
∈ \in ∈
\in
∉ \notin ∈ /
\notin
无穷、偏分、证明
样例
指令
样例
指令
∞ \infty ∞
\infty
∃ \exists ∃
\exists
∂ \partial ∂
\partial
¬ \neg ¬
\neg
ø \text{\o} ø
\text{\o}
∵ \because ∵
\because
∀ \forall ∀
\forall
∴ \therefore ∴
\therefore
上标、下标
样例
指令
样例
指令
a ˉ \bar{a} a ˉ
\bar{a}
a ^ \hat{a} a ^
\hat{a}
a b c ^ \widehat{abc} a b c
\widehat{abc}
a ~ \tilde{a} a ~
\tilde{a}
a ~ \utilde{a} a
\utilde{a}
a b c ~ \widetilde{abc} a b c
\widetilde{abc}
A ⃗ \vec{A} A
\vec{A}
A B ‾ \overline{AB} A B
\overline{AB}
A B ‾ \underline{AB} A B
\underline{AB}
A B ← \overleftarrow{AB} A B
\overleftarrow{AB}
A B ← \underleftarrow{AB} A B
\underleftarrow{AB}
A B ↔ \overleftrightarrow{AB} A B
\overleftrightarrow{AB}
A B ↔ \underleftrightarrow{AB} A B
\underleftrightarrow{AB}
A B ↼ \overleftharpoon{AB} A B
\overleftharpoon{AB}
A B ⏠ \overgroup{AB} A B
\overgroup{AB}
A B ⏡ \undergroup{AB} A B
\undergroup{AB}
求和、求积、二项式
样例
指令
$$\sum_{i=1}^n$$
\sum_{i=1}^n
$$\prod_{i=1}^n$$
\prod_{i=1}^n
$$\tbinom{a}{b}$$
\tbinom{a}{b}
矩阵、行列式
( a b c d ) \left(\begin{matrix}
a & b \\
c & d
\end{matrix}\right) ( a c b d )
1 2 3 4 $ $ \left (\begin {matrix}a & b \\ c & d \end {matrix}\right )$ $
∣ a b c d ∣ \left|\begin{matrix}
a & b \\
c & d
\end{matrix}\right| ∣ ∣ ∣ ∣ ∣ a c b d ∣ ∣ ∣ ∣ ∣
1 2 3 4 $ $ \left |\begin {matrix}a & b \\ c & d \end {matrix}\right |$ $
( 1 2 ⋯ n 2 3 ⋯ n + 1 ⋮ ⋮ ⋱ n 2 − 1 n n + 1 ⋯ n 2 ) \left(\begin{matrix}
1 & 2 & \cdots & n \\
2 & 3 & \cdots & n+1 \\
\vdots & \vdots & \ddots & n^2 - 1\\
n & n+1 & \cdots & n^2
\end{matrix}\right) ⎝ ⎜ ⎜ ⎜ ⎜ ⎛ 1 2 ⋮ n 2 3 ⋮ n + 1 ⋯ ⋯ ⋱ ⋯ n n + 1 n 2 − 1 n 2 ⎠ ⎟ ⎟ ⎟ ⎟ ⎞
1 2 3 4 5 6 $ $ \left (\begin {matrix}1 & 2 & \cdots & n \\ 2 & 3 & \cdots & n+1 \\ \vdots & \vdots & \ddots & n^ 2 - 1\\ n & n+1 & \cdots & n^ 2 \end {matrix}\right )$ $
维持等号缩进
f ( X ∣ θ ) = f ( x 1 , x 2 , ⋯ , x n ∣ θ ) = f ( x 1 ∣ θ ) ⋅ f ( x 2 ∣ θ ) ⋯ f ( x n ∣ θ ) = ∏ i = 1 n 1 x i ! e − θ θ x i = ( ∏ i = 1 n 1 x i ! ) e − n θ θ ∑ i = 1 n x i \begin{aligned}
f(X|\theta) &= f(x_1,x_2,\cdots,x_n|\theta)\\
&= f(x_1|\theta) \cdot f(x_2|\theta) \cdots f(x_n|\theta)\\
&= \prod_{i=1}^n \frac{1}{x_i !} e^{-\theta}\theta^{x_i}\\
&= \left(\prod_{i=1}^n \frac{1}{x_i !}\right) e^{-n \theta}\theta^{\sum_{i=1}^n x_i}
\end{aligned} f ( X ∣ θ ) = f ( x 1 , x 2 , ⋯ , x n ∣ θ ) = f ( x 1 ∣ θ ) ⋅ f ( x 2 ∣ θ ) ⋯ f ( x n ∣ θ ) = i = 1 ∏ n x i ! 1 e − θ θ x i = ( i = 1 ∏ n x i ! 1 ) e − n θ θ ∑ i = 1 n x i
1 2 3 4 5 6 $ $ \begin {aligned} f(X|\theta ) & = f(x_ 1,x_ 2,\cdots ,x_ n|\theta )\\ & = f(x_ 1|\theta ) \cdot f(x_ 2|\theta ) \cdots f(x_ n|\theta )\\ & = \prod _ {i=1}^ n \frac {1}{x_ i !} e^ {-\theta }\theta ^ {x_ i}\\ & = \left (\prod _ {i=1}^ n \frac {1}{x_ i !}\right ) e^ {-n \theta }\theta ^ {\sum _ {i=1}^ n x_ i} \end {aligned}$ $
分段函数的表示(与Latex有差异)
因为不能用\equation和各种\cases,所以需要变通一下
f ( x , θ ) = { 1 x 2 π θ e − 1 2 θ [ log ( x ) ] 2 , x > 0 0 , otherwise f(x,\theta) = \left\{ \begin{array}{ll}
\dfrac{1}{x\sqrt{2\pi \theta}} e^{-\frac{1}{2\theta} [\log(x)]^2} &,\text{ $x>0$} \\
0 &,\text{ otherwise}
\end{array} \right.
f ( x , θ ) = ⎩ ⎪ ⎨ ⎪ ⎧ x 2 π θ 1 e − 2 θ 1 [ l o g ( x ) ] 2 0 , x > 0 , otherwise
1 2 3 4 5 $ $ f(x,\theta ) = \left \{ \begin {array}{ll}\dfrac {1}{x\sqrt {2\pi \theta }} e^ {-\frac {1}{2\theta } [\log (x)]^ 2} & ,\text { $ x>0$ } \\ 0 & ,\text { otherwise} \end {array} \right .$ $