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

V1×V2=ijkXuYu0XvYv0 \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}

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 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://img-blog.csdn.net/20181024134817911?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2xlZV9jY3I=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)

在這裏插入圖片描述

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$

limxexp(x)=0\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==

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 文檔

CSDN Markdown 語法


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

  2. 這裏是腳註 1 的內容。. ↩︎

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章