Typora的Markdown语法指南
[TOC]
一、标题&目录
语法:
1 2 3 4 5 6 7
| [TOC] //目录项 参见目录 # H1 ## H2 ### H3 ... ###### H6 ####### H6 //最大只支持六级标题
|
二、引用
语法:
1 2 3 4 5 6 7
| > 一级引用 > > 二级引用 > > > 三级引用 > > 二级引用 > 一级引用 > 引用可以嵌套多层东西
|
效果:
一级引用
二级引用
三级引用
二级引用
一级引用
这是一个标题。
给出一些例子代码:
1
| eturn shell_exec("echo $input | $markdown_script");
|
三、有序&无序&任务列表
语法:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| 1. Red 2. Green 3. Blue //有序列表
* Red //无序列表 * Green * Blue + Red + Green + Blue - Red - Green - Blue //完全一致 1986\. What a great season. //转义字符 - ```c++ cout<<"依旧可以嵌套"; ```
- ```java System.out.print("依旧可以嵌套"); ```
- ```python print("依旧可以嵌套"); ``` - [ ] 未完成事项 //任务列表 - [x] 已完成事项
|
效果:
- red
- blue
- green
1986. What a great season.
1
| System.out.print("依旧可以嵌套");
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
| #### 效果:
```c++ cout<<"依旧可以嵌套"; ```
```java System.out.print("依旧可以嵌套"); ```
```python print("依旧可以嵌套"); ```
### 五、分隔线
#### 语法:
```markdown 我的下面是分割线 * * * 我的上下是分割线 *** 我的上下是分割线 ***** 我的上下是分割线 - - - 我的上下是分割线 而且我被强调了 ----- 我的上面是分割线 ```
#### 效果:
我的下面是分割线
------
我的上下是分割线
------
我的上下是分割线
------
我的上下是分割线
------
## 我的上下是分割线 而且我被强调了
我的上面是分割线
### 六、超链接
#### 语法:
```markdown This is [an example](http://example.com/ "Title") inline link. [This link](http://example.net/) has no title attribute.
See my [About](/about/) page for details.
This is [an example][id] reference-style link.
[id]: https://openfire.top "这是我的主页" [Google]: http://google.com/ "Google"
I get 10 times more traffic from [Google][] than from [Yahoo][] or [MSN][].
[google]: http://google.com/ "Google" [yahoo]: http://search.yahoo.com/ "Yahoo Search" [msn]: http://search.msn.com/ "MSN Search" <http://example.com/> <address@example.com> ```
#### 效果:
This is [an example](http://example.com/ "Title") inline link. [This link](http://example.net/) has no title attribute.
See my [About](/about/) page for details.
This is [an example][id] reference-style link.
[id]: https://openfire.top "这是我的主页" [Google]: http://google.com/ "Google"
I get 10 times more traffic from [Google][] than from [Yahoo][] or [MSN][].
[google]: http://google.com/ "Google" [yahoo]: http://search.yahoo.com/ "Yahoo Search" [msn]: http://search.msn.com/ "MSN Search"
<http://example.com/> <address@example.com>
### 七、强调与表情
#### 语法:
```markdown *single asterisks* //斜体
_single underscores_
**double asterisks** //加粗
__double underscores__
un *frigging* believable
\*this text is surrounded by literal asterisks\* //需要"*"请加转义符号
Use the `printf()` function. //代码
<u>下划线的内容</u> //下划线 ~~删除线的内容~~ ==我是最重要的== //Typora 高亮没能实现 <font color=#2196F3 size=5 face="宋体">宋体大小为5的字</font> //设置文字格式 :happy: //表情 ```
#### 效果
*single asterisks*
_single underscores_
**double asterisks**
__double underscores__
un *frigging* believable
\*this text is surrounded by literal asterisks\* //需要"*"请加转义符号
Use the `printf()` function.
<u>下划线的内容</u>
~~删除线的内容~~
==额 尴尬 似乎不太好使==
<font color=#2196F3 size=5 face="宋体">宋体大小为5的字</font>
:happy:
### 八、图片
#### 语法:
```markdown  //绝对路径
 //相对路径 + 提示词 ```
#### 效果:
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-acaqR4vN-1618786373249)(X:\Multi-Media\Picture\psb.jpg)]
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-7ARWLsUm-1618786373251)(X:\Multi-Media\壁纸\1815459.png "吃藕丑")]
### 九、表格
#### 语法:
```markdown | 大标题1 | 大标题1 | 大标题1 | | :------ | ------- | ------- | | 内容1 | 内容2 | 内容3 | | 内容1 | 内容2 | 内容3 | ```
#### 效果:
| 大标题1 | 大标题1 | 大标题1 | | :------ | :-------: | ------- | | 内容1 | 内容2 | 内容3 | | 内容1 | 内容2 | 内容3 |
### 十、公式块
#### 代码:
```markdown $$ f(x) = (A+B)/2 $$
```
#### 效果:
$$ f(x) = (A+B)/2 $$
### 十一、其他注意事项
#### 语法:
```markdown <!--这是一个注释1--> [^瞎写个]:这个是一个瞎写的脚注 //推荐写在文本最下方
需要转译的字符:[^瞎写个] <br/> //换行 \\ 反斜线 \` 反引号 \* 星号 \_ 底线 \{\} 花括号 \[\] 方括号 \(\) 括弧 \# 井字号 \+ 加号 \- 减号 \. 英文句点 \! 惊叹号 ```
#### 效果:
<!--这是一个注释-->
需要转译的字符:[^瞎写个]
<br/>
\\ 反斜线 \` 反引号 \* 星号 \_ 底线 \{\} 花括号 \[\] 方括号 \(\) 括弧 \# 井字号 \+ 加号 \- 减号 \. 英文句点[^???] \! 惊叹号[^whoamI]
### 十二、markdown中存在但是typora中没实现的部分
#### 流程图:
~~~markdown ``` graph TB A((圆)) B[长方形] C{菱形} A[1]-->B[2] B-->X B-->|插入文本|Y B-->Z ```
|
1 2 3 4 5 6 7 8
| st=>start: 用户登陆 op=>operation: 登陆操作 cond=>condition: 登陆成功 Yes or No? e=>end: 进入后台
st->op->cond cond(yes)->e cond(no)->op
|
甘特图:
1 2 3 4 5 6 7 8 9 10
| gantt dateFormat YYYY-MM-DD title 计划 section 计划1 分班考: 2018-07-21, 4d section 计划2 吉他: 2018-07-23, 10d section 计划3 电子琴: 2018-07-21, 10d
|
瞎写个. 这个注释推荐写在最下方 ↩
???. ???????????? ↩
- EOF -