常用的语法不表,这里汇总下还不熟悉的.
分割线
在一行中用三个以上的星号、减号、底线来建立一个分隔线,行内不能有其他东西。
***
任务列表
- [x]
- this is a complete item
- []
- this is an incomplete item
html语法
因为markdown兼容html语法,所以可以在markdown中用一些html的语法.常用的有:
| 输入 | 显示 | 输入 | 显示 |
|---|---|---|---|
| <br> | 换行 | | 空格 |
数学运算符
| 输入 | 显示 | 输入 | 显示 | 输入 | 显示 |
|---|---|---|---|---|---|
| \pm | ±\pm± | \times | ×\times× | \div | ÷\div÷ |
| \le | ≤\le≤ | \ge | ≥\ge≥ | \neq | ≠\neq= |
| \approx | ≈\approx≈ | \sum | ∑\sum∑ | \prod | ∏\prod∏ |
| \in | ∈\in∈ | \notin | ∉\notin∈/ | \subseteq | ⊆\subseteq⊆ |
| \prime | ′\prime′ | \propto | ∝\propto∝ | \infty | ∞\infty∞ |
| \otime | ⊗\otimes⊗ | \ctime | ⋅\cdot⋅ |
戴帽符号
| 输入 | 显示 | 输入 | 显示 |
|---|---|---|---|
| \bar{x} | xˉ\bar{x}xˉ | \overline{xy} | xy‾\overline{xy}xy |
| \hat{x} | x^\hat{x}x^ | \widehat{xy} | xy^\widehat{xy}xy |
| \tilde{x} | x~\tilde{x}x~ | \widetilde{xy} | xy~\widetilde{xy}xy |
| \overrightarrow{x} | x→\overrightarrow{x}x | \dot{x} | x˙\dot{x}x˙ |
矩阵
$\begin{matrix} 1 & 2 \\ 3 & 4 \\ \end{matrix}$
$\begin{pmatrix} 1 & 2 \\ 3 & 4 \\ \end{pmatrix}$
$\begin{bmatrix} 1 & 2 \\ 3 & 4 \\ \end{bmatrix}$
| matrix | pmatrix | bmatrix |
|---|---|---|
| 1234\begin{matrix} 1 & 2 \\ 3 & 4 \\ \end{matrix}1324 | (1234)\begin{pmatrix} 1 & 2 \\ 3 & 4 \\ \end{pmatrix}(1324) | [1234]\begin{bmatrix} 1 & 2 \\ 3 & 4 \\ \end{bmatrix}[1324] |
等式对其
$\begin{aligned}
y &=(a+b)^2 \\
&= a^2+2ab+b^2
\end{aligned}$
y=(a+b)2=a2+2ab+b2\begin{aligned} y &=(a+b)^2 \\ &= a^2+2ab+b^2 \end{aligned}y=(a+b)2=a2+2ab+b2
本文深入讲解Markdown语法中不常提及但十分实用的功能,包括高级文本格式化技巧、数学公式、矩阵表达、等式对齐及HTML语法兼容性,旨在帮助读者掌握Markdown的全面应用。

1万+

被折叠的 条评论
为什么被折叠?



