轻松记录您
灵感和创意

半个小时学会Markdown标记语法

学习编程的过程需要敲大量代码,遇到很多错误,好脑子不如烂笔头,能一边敲代码一边做笔记,学起来事倍功半,今天分享大家一个做笔记的工具软件Typora。
  • N级标题
  • This is an H2
    • This is an H3
  • 加粗、斜体
  • 高亮
  • 下划线
  • 删除线
  • 引用
  • 列表
    • 有序列表
    • 无序列表
  • 代码块
  • 表格
  • 超链接
  • 插入图片
  • 任务清单
  • 数学公式
  • mermaid图表

N级标题

一个#就是一个级,最多支持六级标题。

# This is an H1

## This is an H2

### This is an H3

效果如下

This is an H1

This is an H2

This is an H3

加粗、斜体

**加粗的文本**

加粗的文本

*斜体文本*

斜体文本

高亮

==highlight高亮==

==highlight高亮==

下划线

<u>下划线内容</u>

下划线内容

删除线

 ~~Mistaken text.~~

Mistaken text.

引用

> This is another blockquote with one paragraph. There is three empty line to seperate two blockquote.

效果如下

This is another blockquote with one paragraph. There is three empty line to seperate two blockquote.

列表

有序列表

ordered list:
1. Red
2. Green
3. Blue

ordered list:

  1. Red
  2. Green
  3. Blue

无序列表

un-ordered list:
- Red
- Green
- Blue

un-ordered list:

  • Red
  • Green
  • Blue

代码块

一般情况下,word等office软件不支持代码高亮,且存储代码容易乱行。以typora为首的markdown语法完美支持各种代码,这里以Python代码为例

`python
import requests
url = 'https://www.baidu.com/'
resp = requests.get(url)
</code></pre>
<pre data-tool="mdnice编辑器"><code>import requests
url = 'https://www.baidu.com/'
resp = requests.get(url)
</code></pre>
<h2 data-tool="mdnice编辑器">表格</h2>
<pre data-tool="mdnice编辑器"><code>| First Column  | Second Column |
| ------------- | ------------- |
| Content Cell1 | Content Cell2 |
| Content Cell3 | Content Cell4 |
</code></pre>
<table data-tool="mdnice编辑器">
<thead>
<tr>
<th>First Column</th>
<th>Second Column</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content Cell1</td>
<td>Content Cell2</td>
</tr>
<tr>
<td>Content Cell3</td>
<td>Content Cell4</td>
</tr>
</tbody>
</table>
<h2 data-tool="mdnice编辑器">超链接</h2>
<pre data-tool="mdnice编辑器"><code>[百度](https://www.baidu.com/)
</code></pre>
<p data-tool="mdnice编辑器">百度</p>

<h2 data-tool="mdnice编辑器">插入图片</h2>
<p data-tool="mdnice编辑器">插入图片的语法</p>

<pre data-tool="mdnice编辑器"><code>![](图片文件路径或网址)
</code></pre>
<pre data-tool="mdnice编辑器"><code>![](https://thunderhit.github.io/post/hugo/featured_hu9a15b8275a5635099198061a5e2dc1dd_3029870_720x0_resize_lanczos_2.png)</code></pre>
<h2 data-tool="mdnice编辑器">任务清单</h2>
<pre data-tool="mdnice编辑器"><code>某日任务清单
- [x] 6点起床
- [ ] 步数达到10000步
- [x] 读一小时书
- [x] 日消费不超过50元
</code></pre>
<p data-tool="mdnice编辑器">某日任务清单</p>

<ul class="list-paddingleft-2" data-tool="mdnice编辑器">
 	<li><section>[x] 6点起床</section></li>
 	<li><section>[ ] 步数达到10000步</section></li>
 	<li><section>[x] 读一小时书</section></li>
 	<li><section>[x] 日消费不超过50元</section></li>
</ul>
<h2 data-tool="mdnice编辑器">数学公式</h2>
<p data-tool="mdnice编辑器">在markdown中用<code>$</code>夹住Latex公式表达式</p>

<pre data-tool="mdnice编辑器"><code>$\lim_{x \to \infty} \exp(-x) = 0$
</code></pre>
<p data-tool="mdnice编辑器"></p>

<pre data-tool="mdnice编辑器"><code>$y = a*x + b$
</code></pre>
<p data-tool="mdnice编辑器"></p>

<h2 data-tool="mdnice编辑器">mermaid图表</h2>
<p data-tool="mdnice编辑器">Typora中可以绘制流程图、序列图、状态图、甘特图、饼形图、类图等,这里以流程图为例</p>

<pre data-tool="mdnice编辑器"><code>```mermaid
graph LR
 A-->B
 B-->C
 C-->D
graph LR
	A-->B
	B-->C
	C-->D
未经允许不得转载:坚果云Markdown » 半个小时学会Markdown标记语法
分享到: 更多 (0)

坚果云Markdown轻松记录您 灵感和创意

坚果云Markdown下载坚果云Markdown介绍