Markdown 相关语法
生成目录
[TOC](GIt 远程控制github)
Xiaolong <u>[Xiaolong ](https://rankxiaolong.github.io/)</u>
公式
公式 \eqref{eq1}
$$ \mathbf{x}_{t}=\Phi_{t}\left(\mathbf{x}_{t-1}\right)+\mathbf{v}_{t} \tag{1} \label{eq1}$$
公式 \eqref{eq1}
字体颜色设置
Problem:
Solution:
Definition:
Remarks:
Lemma Theorem
疑问:
Assumption:
Proof:
<font color=LightCoral>**Problem:**</font>
<font color=LightBlue >**Solution:**</font>
<font color=Lime >**Definition:**</font>
<font color=LightSalmon >**Remarks:**</font>
<font color=Aqua >**Lemma Theorem**</font>
<font color=Red >**疑问:**</font>
<font color=DarkViolet >**Assumption:**</font>
<font color=HotPink >***Proof:***</font>
图片缩放
![](https://files.mdnice.com/user/1150/722d9415-0fca-4881-8515-588486c2421a.png)
<div align='center'>
<img src='https://files.mdnice.com/user/1150/722d9415-0fca-4881-8515-588486c2421a.png' width="65%">
</div>
a 标签
- a 标签 链接颜色设置:https://www.php.cn/css-tutorial-409366.html
- typro 页面内超链接跳转:https://blog.csdn.net/solid_panda/article/details/105227258
- Cnblogs页面内跳转: https://www.cnblogs.com/oklizz/p/11405644.html
- CSS,HTML:https://www.cnblogs.com/yefanhua/p/9224501.html
三线表
Bernoulli Sampling | Simple random samling | ||
张三 | Yes | No | |
李四 | F | No | Yes |
王五 | M | No | No |
<table align="center" style="width:100%; border:#000 solid; border-width:1px 0">
<caption>Table 1: Theoretical and Empirical(using 1000 Monte Carlo simulations) first-order inclusion probabilities. </caption>
<thead style="border-bottom:#000 1px solid;">
<tr>
<th style="border:0"></th>
<td style="border:0">Bernoulli Sampling</td>
<td style="border:0">Simple random samling</td>
</tr>
<th style="border:0"></th>
<td style="border:0"></td>
</thead>
<tr>
<th style="border:0">张三</th>
<td style="border:0"></td>
<td style="border:0">Yes</td>
<td style="border:0">No</td>
</tr>
<tr>
<th style="border:0">李四</th>
<td style="border:0">F</td>
<td style="border:0">No</td>
<td style="border:0">Yes</td>
</tr>
<tr>
<th style="border:0">王五</th>
<td style="border:0">M</td>
<td style="border:0">No</td>
<td style="border:0">No</td>
</tr>
</table>
作者
Autor : Gauss
对应 Code:
<div>
<center>
<span> <font size=4 color= #034fd8 ><b>Mardown 1 </b>
</font></span> <br>
<span> <font size=3 color= blue ><b> Autor : Gauss </b>
</font></span>
</center>
</div>
Problem
Solution
Definition
Remarks
Lemma Theorem
Note
Assumption
Importance
<font color=LightCoral>**Problem**</font>
<font color=LightBlue >**Solution**</font>
<font color=Lime >**Definition**</font>
<font color=LightSalmon >**Remarks**</font>
<font color=MediumSlateBlue >**Lemma Theorem**</font>
<font color=Red >**Note**</font>
<font color=DarkViolet >**Assumption**</font>
<font color=HotPink >**Importance**</font>
基础篇
1.标题
# 一级标题
## 二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题
2.字体
加粗
斜体
斜体加粗
删除线
下划线
高亮
下标
上标
**加粗**
*斜体*
***斜体加粗***
~~删除线~~
<u>下划线</u>
==高亮==
~下标~
^上标^
其他字体设置
文字 文字
文字 文字
文字 文字
文字 文字
文字 文字
文字 文字
我是黑体字
我是微软雅黑
我是华文彩云
我是红色
我是绿色
我是蓝色
我是尺寸
我是黑体,绿色,尺寸为5
<font color=#8B1A1A >文字</font> <font color=#7FFFD4 >文字</font>
<font color=#FF8247 >文字</font> <font color=#7FFF00 >文字</font>
<font color=#FF0000 >文字</font> <font color=#FF7F00 >文字</font>
<font color=#F4A460 >文字</font> <font color=#000080 >文字</font>
<font color=#ADFF2F >文字</font> <font color=#0000CD >文字</font>
<font color=#D02090 >文字</font> <font color=#D87093 >文字</font>
<font face="黑体">我是黑体字</font>
<font face="微软雅黑">我是微软雅黑</font>
<font face="STCAIYUN">我是华文彩云</font>
<font color=red>我是红色</font>
<font color=#008000>我是绿色</font>
<font color=Blue>我是蓝色</font>
<font size=5>我是尺寸</font>
<font face="黑体" color=green size=5>我是黑体,绿色,尺寸为5</font>
笔记字体
Problem
Solution
Definition
Remarks
Lemma Theorem
Note
Assumption
Importance
<font color=LightCoral>**Problem**</font>
<font color=LightBlue >**Solution**</font>
<font color=Lime >**Definition**</font>
<font color=LightSalmon >**Remarks**</font>
<font color=MediumSlateBlue >**Lemma Theorem**</font>
<font color=Red >**Note**</font>
<font color=DarkViolet >**Assumption**</font>
<font color=HotPink >**Importance**</font>
文字居中
<center>这一行需要居中</center>
颜色
<font color=red size=25>颜色</font>
居中大标题
<center> <font size=15 ><b> 标题</b></font></center>
背景颜色
<table><tr><td bgcolor=orange>背景色是:orange</td></tr></table>
<table><tr><td bgcolor=#FF4500>这里的背景色是:OrangeRed, 十六进制颜色值:#FF4500, rgb(255, 69, 0)</td></tr></table>
背景色是:orange |
这里的背景色是:OrangeRed, 十六进制颜色值:#FF4500, rgb(255, 69, 0) |
3.引用
引用内容
引用内容
引用内容
>引用内容
>>引用内容
>>>引用内容
4.分割线
三个或以上的*** 或 --- 为分割线
---
----
***
****
5.注释
[//]:注释不会在浏览器中显示
<!--Markdown 注释内容-->
[^_^]: 注释不会在浏览器中显示
6.列表
无序列表
- 加号+空格
- 减号+空格
- 星号+空格
+ 加号+空格
- 减号+空格
* 星号+空格
有序列表
- 数字+空格
- 数字+空格
- 数字+空格
1. 数字+空格
2. 数字+空格
3. 数字+空格
有序列表嵌套
-
列出所有元素:
- 无序列表A
- 元素A的有序子列表
- 列表
- 无序列表B
- 无序列表A
-
列表里的多段换行:前面必须加四个空格,
这样换行,整体的格式不会乱 -
列表里引用:
前面空一行 仍要在> 前面加四个空格
1. 列出所有元素:
- 无序列表A
1. 元素A的有序子列表
2. 列表
- 无序列表B
2. 列表里的多段换行:前面必须加四个空格,
这样换行,整体的格式不会乱
3. 列表里引用:
> 前面空一行 仍要在> 前面加四个空格
完成号
- [] 计划任务
- [x] 完成任务
7.代码块
######### Newton-Raphson #############
## 使用sympy库的符号函数,直接求二阶导数
from sympy import symbols,Matrix,sympify
import numpy as np
def Jac_Hes(f,variables,point):
v = Matrix(list(variables))
U = f.jacobian(v)
H = f.jacobian(v).jacobian(v)
variable_dict = {}
for i in range(len(point)):
variable_dict[variables[i]] = point[i]
y = np.squeeze(np.array(f.subs(variable_dict)).astype(float))
U = np.squeeze(np.array(U.subs(variable_dict)).astype(float))
H = np.squeeze(np.array(H.subs(variable_dict)).astype(float))
return y,U,H
```python
```
```R
```
```markdown
```
8.图片
![插入网络图片](https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg)
居中与大小设置
![](https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg)
<div align=center>
<img src="/Users/guass/Desktop/markdown/计算机软件教程/xmu.jpg" width="500" height="100" />
</div>
![](https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg)
<div align=center>
<img src="https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg" width="65%" />
</div>
两图并排
![](https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg)
![](https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg)
<center class="half">
<img src="https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg" width="30%"/>
<img src="https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg" width="30%"/>
</center>
三图并列
<figure class="third">
<img src="https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg">
<img src="https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg">
<img src="https://wise.xmu.edu.cn/widgets/Themes/Default/images/banner.jpg">
</figure>
图片加题注
![](/Users/guass/Desktop/markdown/计算机软件教程/xmu.jpg)
<center>
<img style="border-radius: 0.3125em;
box-shadow: 0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.08);"
src="/Users/guass/Desktop/markdown/计算机软件教程/xmu.jpg">
<br>
<div style="color:orange; border-bottom: 1px solid #d9d9d9;
display: inline-block;
color: #999;
padding: 2px;">这里输入题注</div>
</center>
9.表格
表头 | 表头 |
---|---|
单元格 | 单元格 |
单元格 | 单元格 |
|表头|表头|
|---|---|
|单元格|单元格|
|单元格|单元格|
左对齐 | 右对齐 | 居中对齐 |
---|---|---|
单元格 | 单元格 | 单元格 |
单元格 | 单元格 | 单元格 |
|左对齐|右对齐|居中对齐|
|:--|--:|:--:|
|单元格|单元格|单元格|
|单元格|单元格|单元格|
表格宽度
字段名 | 说明 | 字段名 | 说明 |
---|---|---|---|
client_no | 客户号 | nprem_o | 车损险保费 |
dpt | 机构:共有 11 个机构,以三位数为代码,如 210 | si_od | 车损险保额 |
xz | 险种:“商交”,“单交” | nprem_tp | 商三险保费 |
xb | 险别:“交三”,“主全”,“单交” | si_tp | 商三险保额 |
使用以下命令会使“车险保险费”一行,前后可加 
与
类似空格可以增加宽度
<span style="white-space:nowrap;">车损险保费</span>
10.注脚
文本的注脚^2
文本的注脚[^2]
[^2]:注脚的解释
11.甘特图
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
section 现有任务
已完成 :done, des1, 2014-01-06,2014-01-08
进行中 :active, des2, 2014-01-09, 3d
计划一 : des3, after des2, 5d
计划二 : des4, after des3, 5d
- 关于 甘特图 语法,参考 https://mermaidjs.github.io/
12.UML图表
序列图
```mermaid
sequenceDiagram
张三 ->> 李四: 你好!李四, 最近怎么样?
李四-->>王五: 你最近怎么样,王五?
李四--x 张三: 我很好,谢谢!
李四-x 王五: 我很好,谢谢!
Note right of 王五: 李四想了很长时间, 文字太长了<br/>不适合放在一行.
李四-->>张三: 打量着王五...
张三->>王五: 很好... 王五, 你怎么样?
```
流程图
```mermaid
graph LR %
A[长方形] -- 链接 --> B((圆))
A --> C(圆角长方形)
B --> D{菱形}
C --> D
```
- 关于 Mermaid 语法,参考https://mermaidjs.github.io/
https://www.jianshu.com/p/67118684f636/
13.键盘
Ctrl/Command
Z
<kbd>Ctrl/Command</kbd>
<kbd>Z</kbd>
14.公式
普通环境
$$
a = b^2 + c^2
$$
align 环境
公式无编号
$$
\begin{aligned}
a &= b^2 + c^2\\
&= w^3 + b
\end{aligned}
$$
公式有编号
$$
\begin{align}
a &= b^2 + c^2\\
&= w^3 + b
\end{align}
$$
公式编号与引用
- 插入编号:
使用\tag
指令指定公式的具体编号,并使用\label
指令埋下锚点。如y=x^2 \tag{1.5a} \label{eq:1}
:
$$
\begin{align}
a &= b^2 + c^2 \tag{1.5a} \label{eq:1} \\
&= w^3 + b \tag{2.5B} \label{eq:2}
\end{align}
$$
- 引用编号:
使用\eqref
指令引用前面埋下的锚点,\eqref{eq:1}
将显示为:\(\eqref{eq:1}\)
$\eqref{eq:1}$
公式字体
加粗:\(\pmb{A}\)
加粗倾斜:\(\boldsymbol{A}\)
加粗:$\pmb{A}$
加粗倾斜:$\boldsymbol{A}$
字体颜色
修改字体颜色使用LaTeX公式$\color{options}{text}$
。options选择颜色,text选择公式内容。
如以下示例程序:
序号 | LaTeX公式 | LaTeX示例效果 |
---|---|---|
1 | $\color{Green}{y = ax^2 + bx + c}$ |
\(\color{Green}{y = ax^2 + bx + c}\) |
2 | $\color{Orange}{y} = \color{Red}{kx} + \color{Blue}{b}$ |
\(\color{Orange}{y} = \color{Red}{kx} + \color{Blue}{b}\) |
3 | ${\color{Emerald}z^2} = {\color{Yellow}x^2} + {\color{Cyan}y^2}$ |
\({\color{Emerald}z^2} = {\color{Yellow}x^2} + {\color{Cyan}y^2}\) |
背景颜色
修改背景颜色使用LaTeX公式$\colorbox{options}{text}$
。options
选择颜色,text
选择文本内容。
如以下示例程序:
序号 | LaTeX公式 | LaTeX示例效果 |
---|---|---|
1 | $\colorbox{Green}{y = ax + bx + c}$ |
\(\colorbox{Green}{y = ax + bx + c}\) |
2 | $\colorbox{Orange}{y} = \colorbox{Red}{kx} + \colorbox{Blue}{b}$ |
\(\colorbox{Orange}{y} = \colorbox{Red}{kx} + \colorbox{Blue}{b}\) |
3 | ${\colorbox{Emerald}z^2} = {\colorbox{Yellow}x^2} + {\colorbox{Cyan}y^2}$ |
\({\colorbox{Emerald}z^2} = {\colorbox{Yellow}x^2} + {\colorbox{Cyan}y^2}\) |
公式字典
字母符号
符号 | 公式 | 符号 | 公式 | 符号 | 公式 |
---|---|---|---|---|---|
\(\alpha\) | \alpha | \(\iota\) | \iota | \(\sigma\) | \sigma |
\(\beta\) | \beta | \(\kappa\) | \kappa | \(\tau\) | \tau |
\(\gamma\) | \gamma | \(\lambda\) | \lambda | \(\upsilon\) | \upsilon |
\(\delta\) | \delta | \(\mu\) | \mu | \(\phi\) | \phi |
\(\epsilon\) | \epsilon | \(\nu\) | \nu | \(\chi\) | \chi |
\(\zeta\) | \zeta | \(\xi\) | \xi | \(\psi\) | \psi |
\(\eta\) | \eta | \(\pi\) | \pi | \(\omega\) | \omega |
\(\theta\) | \theta | \(\rho\) | \rho | \(\varsigma\) | \varsigma |
\(\varepsilon\) | \varepsilon | \(\varphi\) | \varphi | \(\varphi\) | \varphi |
\(\vartheta\) | \vartheta | \(\varrho\) | \varrho | \(\varkappa\) | \varkappa |
\(\digamma\) | \digamma | \(\ell\) | \ell | ||
\(\Gamma\) | \Gamma | \(\Xi\) | \Xi | \(\Phi\) | \Phi |
\(\Delta\) | \Delta | \(\Pi\) | \Pi | \(\Psi\) | \Psi |
\(\Theta\) | \Theta | \(\Sigma\) | \Sigma | \(\Omega\) | \Omega |
\(\Lambda\) | \Lambda | \(\Upsilon\) | \Upsilon | \(\varPhi\) | \varPhi |
\(\varGamma\) | \varGamma | \(\varXi\) | \varXi | \(\varPsi\) | \varPsi |
\(\varDelta\) | \varDelta | \(\varPi\) | \varPi | \(\varOmega\) | \VarOmega |
\(\varTheta\) | \varTheta | \(\varSigma\) | \varSigma | ||
\(\varLambda\) | \varLambda | \(\varUpsilon\) | \varUpsilon |
关系符号
符号 | 公式 | 符号 | 公式 | 符号 | 公式 |
---|---|---|---|---|---|
< | > | ||||
\leq | \geq | ||||
\ll | |||||
\prec | |||||
\preceq | |||||
\subset | |||||
\subseteq | |||||
\sqsubset | |||||
\sqsubseteq | |||||
\in | |||||
\vdash | |||||
\mid | |||||
\smile | |||||
: | |||||