Markdown 语法

1 快速上手

欢迎大驾光临 🙋‍♀️

1.1 基础语法

1.1.1 文本

示例

It's very easy to make some words **bold** and other words *italic* with 
Markdown. You can even [link to Google!](http://google.com)

It's very easy to make some words bold and other words italic with Markdown. You can even link to Google!

标题

# 一级标题
## 二级标题
### 三级标题
...

加粗/斜体

*斜体*
_斜体_

**加粗**
__加粗__

_**加粗**与斜体相结合_
__加粗文字中*斜体*__

斜体

斜体

加粗

加粗

斜体文字中加粗

加粗文字中斜体

1.1.2 列表

无序列表

* 蔬菜
* 水果
  * 苹果
  * 梨
  * 香蕉
  • 蔬菜
  • 水果
    • 苹果
    • 香蕉

有序列表

1. 蔬菜
1. 水果
  1. 苹果
  2. 梨
  3. 香蕉
1. 绿色植物
  1. 水杉
  2. 琴叶榕
  1. 蔬菜
  2. 水果
  3. 苹果
  4. 香蕉
  5. 绿色植物
  6. 水杉
  7. 琴叶榕

1.1.3 图片

插入本地图片

格式:![文字描述](url)
![notable](icon_small.png)

插入网页图片

![豆瓣](https://media.bjnews.com.cn/image/2019/07/01/4809881880251933907.jpg)

豆瓣

1.1.4 引用

> A man sees things differently at diffrent times in his life.

A man sees things differently at diffrent times in his life.

1.1.5 其它

表格

| 左对齐 | 右对齐 | 居中对齐 |
| :-----| ----: | :----: |
| 单元格 | 单元格 | 单元格 |
| 单元格 | 单元格 | 单元格 |
左对齐 右对齐 居中对齐
单元格 单元格 单元格
单元格 单元格 单元格

超链接

百度

emoji

🏃, 💃, 👯
☀️, ☔, ⚡
🐭, 🐶, 🐰
🐟
🌻, 🌹, 🌿
📒, 📚, 📘, 📗, 📙

表情包查询表:点我 💤

数学公式

行内公式:$$a_1 + a_2 = b_1$$

行内公式:$a_1 + a_2 = b_1$
行间公式:$$\alpha_1 + \beta_1 = \gamma_1$$

行内公式:\(a_1 + a_2 = b_1\)
行间公式:$$\alpha_1 + \beta_1 = \gamma_1$$

插入代码

行内代码

查看Python 内置模块名:`import sys; print(sys.builtin_module_names)`

查看Python 内置模块名:import sys; print(sys.builtin_module_names)

整段代码

import math
print(math.sqrt(3))

1.2 高级语法

1.2.1 序列图

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.2.2 流程图

graph TD; A-->B; A-->C; B-->D; C-->D;

1.2.3 Git 版本管理图

gitGraph: options { "nodeSpacing": 150, "nodeRadius": 10 } end commit branch newbranch checkout newbranch commit commit checkout master commit commit merge newbranch

1.2.4 Class 图

classDiagram Class01 <|-- AveryLongClass : Cool Class03 *-- Class04 Class05 o-- Class06 Class07 .. Class08 Class09 --> C2 : Where am i? Class09 --* C3 Class09 --|> Class07 Class07 : equals() Class07 : Object[] elementData Class01 : size() Class01 : int chimp Class01 : int gorilla Class08 <--> C2: Cool label

有关 mermaid 作图更多细节,见 https://mermaidjs.github.io/#/

posted @ 2019-10-30 19:51  offduty  阅读(196)  评论(0)    收藏  举报