latex & markdown math input
1、嵌入代码块
整行代码块使用三个反单引号 `(半角的~键)
行内代码块使用两个反单引号`,将代码内容夹在其间即可
2、文本相关
2.1修改更换字体的颜色、字体、大小等
1 | <font face="黑体">黑体字</font> |
1 | <font face="xx" color=xxxx size=xxx>xxx</font> |
查看电脑已安装的字体的方法
1、设置——字体(fonts)
2、control panel——fonts
2.2修改背景色
1
2 <table><tr><td bgcolor=red>设置的背景色是:red</td></tr></table>
1 | 这是一个注脚[^1]。 |
这是一个注脚[1].
2.6文字居中/居左等
1
2
3 <center>居中</center>
<p align="left">居左</p>
<p align="right">居右</p>
居左
居右
3、链接语法
3.1基本语法
1 | [文本描述](文本地址) |
1 | <y-shi23tsinghua@outlook.com> |
3.2如何链接到文本内容
1 | <span id="example">example</span> |
创建的链接是[example](#example)
比如:
[direct to the end](#end)
4、数学语法
4.0 插入数学符号/公式
1 | 使用“$$”插入行内公式,使用“$$(enter)$$”插入行间公式 |
更改字体:
1 >$\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZabc123}$
4.1 希腊字母
example(α):
1
2
3 $$
\alpha \tag1
$$
4.2 分式、开方、上下划线、向量
example(除法):
1
2
3 >$$
>\frac{abc}{xyz} \tag2
>$$
4.3 定界符
example(行列式):
1
2
3
4
5
6
7 $$
\left|\begin{matrix}
a&b&c\\
d&e&f\\
g&h&i
\end{matrix}\right|
$$
输入矩阵的方法
4.4 积分、连加(乘)、交并集、积分
example(Σ):
1
2
3
4 $$
\sum_{i=0}^n \frac{1}{i^2}
\prod_{i=0}^n \frac{1}{i^2}
$$
4.5 其他符号
常用的数学符号
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 $$
\angle
\hat{y}
\rightarrow
\Rightarrow
\Longrightarrow
\overline{a+b+c}
\overbrace{a+\underbrace{b+c}^3+d}^2
\nabla
\therefore
\because
\infity
\forall
\exists
\not=
\neq
\equiv
\leq
\geq
\in
$$
4.6 分段函数
1
2
3
4
5
6
7 $$
f(x) =
\begin{cases}
2x,\,\,x>0\\
3x,\,\,x\le0\\
\end{cases}
$$
4.7排列组合
1
2
3
4 $C_n^m$
$A_n^m$
$\binom{m}{n}$
${m\choose n}$
4.8 如何对齐=
aligned 对齐的
1
2
3
4
5
6
7
8
9
10 $$\begin{aligned}
KPI&=(N+S)W \\
PI&=N+S \\
I&=W
\end{aligned}$$
$$\begin{aligned}
loss&=(y_i-Q(s,a;\theta))^2 \\
&=(r+\gamma \max Q(s^{'},a^{'};\theta^{-})-Q(s,a;\theta)) ^2\\
\end{aligned}$$
5.复选框
1
2
3
4 - [x]已勾选
- []未勾选
* [x]已勾选
+ [x]已勾选
[x] 已勾选
[ ] 未勾选
[x] 已勾选
[x] 已勾选
6.Mermaid语法
1 | flowchart TD |
插入代码,选择mermaid
1 | gantt |
👉原文链接CSDN👈
1
2
3
4
5
6
7
8
9
10
11
12
13
14 ```mermaid
gantt
title 这是个甘特图的栗子🌰
dateFormat MM-DD
section 软件协同开发课程
项目启动 :done,des1,03-09,7d
项目计划 :done,des2,after des1,6d
需求分析 :done,des3,after des2,9d
软件设计 :done,des4,after des3,12d
软件编码 :crit,active,des5,04-07,20d
软件测试 :des6,04-14,15d
项目交付 :des7,after des6,4d
1 | gantt |
1
2
3
4
5
6 pie
title 看文章经常点赞的程序员的脱单情况
"已和女神结婚" : 200
"已脱单,对象非常漂亮" : 132
"已女神被表白,考虑是否接受" : 40
"女神即将表白" : 100
1 | pie |
1 | classDiagram |
1
2
3
4
5
6
7
8
9
10
11
12 sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts<br/>prevail...
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
1 | sequenceDiagram |
1
2
3
4 ```mermaid
graph LR
A["这是A"]
A-->B-->C
1 | graph LR |
似乎暂不支持flowchat。
1
2
3
4
5
6
7
8
9 ``` mermaid
flowchat
st=>start:开始
e=>end:结束
op=>operation:我的操作
cond=>condition:确认?
st->op->cond
cond(yes)->e
cond(no)->op
1 | flowchat |
added
1 | \mathcal{F}^{-1}[\hat{f}(\omega)] |
参考资料
2、
😋The end
脚注1 ↩︎







