Typora Markdown 语法

第一章 块元素(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
1.5任务列表.png

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}
$$

\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}

1.8 表格(Tables)

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

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |
First Header Second Header
Content Cell Content Cell
Content Cell Content 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-Aligned Center Aligned Right Aligned
col 3 is some wordy text $1600
col 2 is centered $12
zebra stripes are neat $1

1.9 脚注(Footnotes)

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

You can create footnotes like this[1].

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

You can create footnotes like this[2].

1.10 横线(Horizontal Rules)

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

---

1.11 目录(Table of Contents -- TOC)

输入 [toc] ,按回车键

1.11目录.png

第二章 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)

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

![timg.jpg](https://upload-images.jianshu.io/upload_images/6226097-1613f3353bb9ec89.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
timg.jpg

2.3 强调(Emphasis)

对应 HTML 的 <em> 标签

*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>
2.7下划线.png

2.8 Emoji 表情(Emoji)

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

:happy:
2.8Emoji.png

2.9 内联数学(Inline Math)

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

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

下面是简书风格,typora 与之类似
\lim_{x \to \infty} \exp(-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==
2.12高亮.png

第三章 HTML

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

<span style="color:red">this text is red</span>
3.1嵌入内容.png

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.1.png

3.2 视频(Video)

<video src="xxx.mp4" />

附录 A 官方文档

Typora 官方文档

附录 B Markdown 文档

简书 Markdown 语法


  1. Here is the text of the footnote.

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 今天进度45% 有时,我们会觉得, 自己的生活忽然间陷入了暧昧不清的境地,进退无措。 就像憋了太久的泪水或者吃了太...
    来约跑步丫阅读 143评论 0 0
  • 小萌说: 前段时间,一篇《北京,有2000万人在假装生活》的文章刷爆朋友圈,引发无数人的共鸣。但如果说北京有200...
    玩转大学WZ阅读 862评论 3 1
  • 工作之余,走出办公室,抬头看看外面的阳光,天色湛蓝,栅栏上的爬山虎郁郁葱葱,有一支新芽,在阳光下挺拔向上,...
    果实_a412阅读 122评论 0 0
  • 响应式开发 响应式网站设计 -----Ethan Marcotte 第一章 响应式网站设计的三大技术成分 流动网格...
    AuthorJim阅读 531评论 0 0
  • 她,命近终点,靠营养液维持。 当年的她,风姿绰约。 不过几年,却病的如此? 悲惨吗?不,她是幸福的。 身如枯槁,情...
    天月初心_瓶子阅读 157评论 0 0