Typora Markdown 语法

本文详细介绍了Typora编辑器的Markdown语法,包括块元素如段落、标题、引用、列表、任务列表、代码块、数学公式等,以及Span元素如链接、图片、强调、加粗、代码、删除线、下划线、表情、内联数学、下标和上标,还涵盖了HTML嵌入和视频等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


第一章 块元素(Block Elements)

1.1 段落和行结束(Paragraph and line breaks)

大多数 markdown 解析器忽略单行分隔符,为了上其他 markdown 解析器识别行分隔符,可以在末尾使用两个空格,或者插入 </br>

1.2 标题(Headers)

标题有6个等级,用 # 号表示

# 标题1
## 标题2
### 标题3
#### 标题4
##### 标题5
###### 标题6

1.3 引用(Blockquotes)

使用 > 字符,表示引用

> This is a blockquote with two paragraphs. This is first paragraph.
>
> This is second pragraph.Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.



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

This is a blockquote with two paragraphs. This is first paragraph.

This is second pragraph.Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
This is another blockquote with one paragraph. There is three empty line to seperate two blockquote.

1.4 列表(Lists)

输入 * 将会创建一个无序列表,也可以使用 + 或者 -

* Red
* Green
* Blue
  • Red
  • Green
  • Blue

输入 1. 将会创建有序列表

1.  Red
2. 	Green
3.	Blue
  1. Red
  2. Green
  3. Blue

1.5 任务列表(Task List)

用 [ ] 或者 [X] 未完成,完成)表示列表,通过点击复选框来更改状态(完成/未完成)

- [ ] a task list item
- [ ] list syntax required
- [ ] normal **formatting**, @mentions, #1234 refs
- [ ] incomplete
- [x] completed
  • a task list item
  • list syntax required
  • normal formatting, @mentions, #1234 refs
  • incomplete
  • completed

1.6 代码块(Code Blocks)

使用 ```<语言> 按回车键,将会对代码进行高亮

​```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
​```
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

1.7 数学(Math Blocks)

可以使用MathJax呈现LaTeX数学表达式。

$$
\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix} 
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0 \\
\end{vmatrix}
$$

V 1 × V 2 = ∣ i j k ∂ X ∂ u ∂ Y ∂ u 0 ∂ X ∂ v ∂ Y ∂ v 0 ∣ \mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} &amp; \mathbf{j} &amp; \mathbf{k} \\ \frac{\partial X}{\partial u} &amp; \frac{\partial Y}{\partial u} &amp; 0 \\ \frac{\partial X}{\partial v} &amp; \frac{\partial Y}{\partial v} &amp; 0 \\ \end{vmatrix} V1×V2=iuXvXjuYvYk00

1.8 表格(Tables)

使用 | First Header | Second Header | 按回车键,将会创建2列的表格

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |
First HeaderSecond Header
Content CellContent Cell
Content CellContent Cell

还可以使用 : 号,来设置文字对齐方式

| Left-Aligned  | Center Aligned  | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is      | some wordy text | $1600 |
| col 2 is      | centered        |   $12 |
| zebra stripes | are neat        |    $1 |
Left-AlignedCenter AlignedRight Aligned
col 3 issome wordy text$1600
col 2 iscentered$12
zebra stripesare neat$1

1.9 脚注(Footnotes)

使用 [^footnote] 创建脚注.
[^footnote]: Here is the *text* of the **footnote**.
然后,可以把鼠标停留在脚注中,查看内容

You can create footnotes like this1.

生产环境,可以像这样使用
You can create footnotes like this[^1].
[^1]: Here is the *text* of the **footnote**.

You can create footnotes like this2.

1.10 横线(Horizontal Rules)

输入 *** 或者 — 后,按回车键

---

1.11 目录(Table of Contents – TOC)

输入 [toc] ,按回车键


第二章 Span 元素(Span Elements)

2.1 链接(Links)

文字描述包含在 [] 内,链接地址包含在 () 内,() 要紧接着 [] 后面

This is [an example](http://example.com/ "Title") inline link.
[This link](http://example.net/) has no title attribute.

This is an example inline link.

This link has no title attribute.

2.1.1 引用链接(Reference Links)

引用链接样式,使用两个 []

This is [an example][id] reference-style link.

Then, anywhere in the document, you define your link label like this, on a line by itself:

[id]: http://example.com/  "Optional Title Here"

This is an example reference-style link.
Then, anywhere in the document, you define your link label like this, on a line by itself:

Type 简化了使用方法,如下

[Bing][]
And then define the link:

[Bing]: http://bing.com/

Bing
And then define the link:

2.2 图片(Images)

在链接格式前面添加 ! ,如下

![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/092942d009029b55b2edcca5ca2c910c.jpeg)

在这里插入图片描述

2.3 强调(Emphasis)

对应 HTML 的 标签

*single asterisks*

_single underscores_

single asterisks
single underscores

如果像使用 * 号,在 * 号前使用 \

\*this text is surrounded by literal asterisks\*

*this text is surrounded by literal asterisks*

2.4 加粗(Strong)

**double asterisks**

__double underscores__

double asterisks
double underscores

2.5 代码(Code)

在文章中现实代码,用 ` 号表示

Use the `printf()` function.

Use the printf() function.

2.6 删除线(Strikethrough)

~~Mistaken text.~~ 

Mistaken text.

2.7 下划线(Underlines)

下划线由 HTML 提供

<u>Underline</u>

Underline

2.8 Emoji 表情(Emoji)

用两个 : 号包含单词,或者在 编辑 -> 表情与符号 中选择

:happy:

在这里插入图片描述

2.9 内联数学(Inline Math)

这个功能默认是关闭的,如果要打开这个功能(以 Mac 版本为例),选择 Typora -> 偏好设置 -> markdown 标签,勾选内联公式复选框

$\lim_{x \to \infty} \exp(-x) = 0$

lim ⁡ x → ∞ exp ⁡ ( − x ) = 0 \lim_{x \to \infty} \exp(-x) = 0 limxexp(x)=0

2.10 下表(subscript)

这个功能默认是关闭的,如果要打开这个功能(以 Mac 版本为例),选择 Typora -> 偏好设置 -> markdown 标签,勾选下标复选框

H~2~O

H2O

2.11 上标(Superscript)

这个功能默认是关闭的,如果要打开这个功能(以 Mac 版本为例),选择 Typora -> 偏好设置 -> markdown 标签,勾选上标复选框

X^2^

X2

2.12 高亮(Highlight)

这个功能默认是关闭的,如果要打开这个功能(以 Mac 版本为例),选择 Typora -> 偏好设置 -> markdown 标签,勾选高亮复选框

==highlight==

highlight


第三章 HTML

可以使用 HTML 样式来写 Markdown,比如

<span style="color:red">this text is red</span>

this text is red

3.1 嵌入内容(Embed Contents)

<iframe height='265' scrolling='no' title='Fancy Animated SVG Menu' src='http://codepen.io/jeangontijo/embed/OxVywj/?height=265&theme-id=0&default-tab=css,result&embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'></iframe>

在这里插入图片描述

3.2 视频(Video)

<video src="xxx.mp4" />

附录 A 官方文档

Typora 官方文档

附录 B Markdown 文档

优快云 Markdown 语法


  1. Here is the text of the footnote. ↩︎

  2. 这里是脚注 1 的内容。. ↩︎

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值