markdown能夠實現快速html文檔編輯,格式優沒,而且不須要使用html元素。 markdown採用普通文本的形式,例如讀書筆記等易於使用的文本格式進行編寫。 若是實在須要生成markdown不支持的html元素的話,能夠直接在文本中嵌入html標籤,markdown並不會將其顯式出來。html
markdown使用#方式對應生成相應的標題標籤,#的個數就是標題的題號!其中二號標題帶添加下劃線。markdown代碼與效果圖以下:java
#標題1 ##標題2 ###標題3 ####標題4 #####標題5 ######標題6 #######標題7
引用某段文本,效果是左側有豎線進行修飾,每一行能夠使用兩個以上的空格結尾,就能夠實現換行效果。markdown文本與效果以下:shell
> ~~~~~~~~~~~黃鶴樓~~~~~~~~~~ > 故人西辭黃鶴樓,煙花三月下揚州。 > 孤帆遠影碧空盡,惟見長江天際流。
故人西辭黃鶴樓,煙花三月下揚州。 孤帆遠影碧空盡,惟見長江天際流。
無符號列表是沒有數字序號,使用圓點做爲修飾符號。markdown使用*、+、-效果是相同的。代碼與效果以下:markdown
- 條目1 - 條目2 - 條目3 - 條目4
有序列表是有數字序號,markdown能夠使用任何數字,不必定非要連續。可是生成的序號是連續的。markdown代碼與效果以下:app
1. 條目1 1. 條目2 1. 條目3 1. 條目4
列表中能夠使用標題,正常使用便可。列表內還能夠嵌入段落。代碼與效果以下:函數
條目1字體
條目2 hello world!spa
final V putVal(int hash, K key, V value, boolean onlyIfAbsent,boolean evict) ..}
###條目2code
段落內容段落內容段落內容段落內容段落內容段落內容段落內容段落內容段落內容 段落內容段落內容段落內容段落內容內容內容內容內容內容內容段落內容段落內容 段落內容段落內容段落內容段落內容htm
###條目1
段落內容段,落內容段落內容段落內容段落內容段落內容段落內容。段落內容段落內容 段落內容段落內容段落內容段落內容段落內容段落內容段落內容段落內容段落內容。到 段落段落內容段落內容段落內容段落內容!
final V putVal(int hash, K key, V value, boolean onlyIfAbsent, boolean evict) { ... return null; }
###條目2
段落內容段落內容段落內容段落內容段落內容段落內容段落內容段落內容段落內容 段落內容段落內容段落內容段落內容內容內容內容內容內容內容段落內容段落內容 段落內容段落內容段落內容段落內容
markdown能夠使用*、-、_實現分割線效果,三者區別是分割線和字體的效果不一樣。代碼和效果以下:
部分1 ---- 部分2 *** 部分3 ____
文本強調使用*或-線括起來。代碼和效果以下:
冬天的時候,*不要*舔鐵!!! 冬天的時候,**不要**舔鐵!!! 冬天的時候,***不要***舔鐵!!!
冬天的時候,不要舔鐵!!!
冬天的時候,不要舔鐵!!!
冬天的時候,不要舔鐵!
表格第一行使用|分割多個字段的名稱,就表示表頭,第二行就是每列的對齊屬性,:-表示左對齊、
-:表示右對齊;:-:表示中間對齊。代碼和效果以下:
ID | 姓名 | 年齡 |
---|---|---|
1 | tom | 90 |
2 | tomas | 100 |
3 | tomasLee | 90 |
4 | tomson | 80 |
時序圖是UML圖中很是重要的一種圖,markdown中支持該圖,可是markdownpad2軟件不支持。代碼效果以下:
```sequence Alice->Bob: Hello Bob,how are you? note right of Bob: Bob thinks Bob-->Alice: I am good thanks! ```
Alice->Bob: Hello Bob,how are you? note right of Bob: Bob thinks Bob-->Alice: I am good thanks!
流程圖是UML圖中很是重要的一種圖,markdown中支持該圖,可是markdownpad2軟件不支持。代碼效果以下:
```flow st=>start: Start op=>operation: Your Operation cond=>condition: Yes or No? e=>end st->op->cond cond(yes)->e cond(no)->op </font> ```
st=>start: Start op=>operation: Your Operation cond=>condition: Yes or No? e=>end st->op->cond cond(yes)->e cond(no)->op </font>
字母名稱 | 大寫 | markdown原文 | 小寫 | markdown原文 |
---|---|---|---|---|
alpha | A | A | α | \alpha |
beta | B | B | β | \beta |
gamma | Γ | \Gamma | γ | \gamma |
delta | Δ | \Delta | δ | \delta |
epsilon | E | E | ϵ | \epsilon |
- | - | - | ε | \varepsilon |
zeta | Z | Z | ζ | \zeta |
eta | E | E | η | \eta |
theta | Θ | \Theta | θ | \theta |
iota | I | I | ι | \iota |
kappa | K | K | κ | \kappa |
lambda | Λ | \Lambda | λ | \lambda |
Mu | M | M | μ | \mu |
nu | N | N | ν | \nu |
xi | Ξ | \Xi | ξ | \xi |
omicron | O | O | ο | \omicron |
pi | Π | \Pi | π | \omicron |
rho | P | P | ρ | \rho |
sigma | Σ | \Sigma | σ | \sigma |
tau | T | T | τ | \tau |
upsilon | Υ | \Upsilon | υ | \upsilon |
phi | Φ | \Phi | ϕ | \phi |
- | - | - | φ | \varphi |
chi | X | X | χ | \chi |
psi | Ψ | \Psi | ψ | \psi |
markdown支持多種數學符號,使用方式以下:
**注意:**數學公式使用時須要使用$
包起來,有時出不來效果的話,就在$
和$$
切換使用一下,能夠看到效果。
符號 | 解釋 | 語法 |
---|---|---|
$\to$ | 趨近於 | \to |
$\infty$ | 無窮大 | \infty() |
$\sum_{n=1}^\infty$ | 求和 | \sum |
x | 乘法 | times(x) |
$\div{}$ | 除法 | \div() |
$\pm $ | 加減號 | \pm |
$\circ$ | 圓圈 | \circ |
$\cdot$ | 點乘 | \cdot |
$\leq$ | 小於等於 | \leq |
$\geq$ | 大於等於 | \geq |
$\subset$ | 子集 | \subset |
$\supset$ | 超集 | \supset |
$\in$ | 屬於 | \in |
$\not=$ | 不等 | \noteq |
$\leftarrow$ | 左箭頭 | \leftarrow |
$\rightarrow$ | 右箭頭 | \rightarrow |
$\longrightarrow$ | 右長箭頭 | \longrightarrow |
$\uparrow$ | 上箭頭 | \uparrow |
$\downarrow$ | 下箭頭 | \downarrow |
$\nabla$ | \nabla | |
$\angle$ | 角 | \angle |
$\forall$ | 任意 | \forall |
$$\exists$$ | 存在 | \exists |
$$\prime$$ | 導數 | \prime |
$\sin$ | 正弦 | \sim |
$$\cos$$ | 餘弦 | \cos |
$\lim_{n=1}^\infty$ | 極限 | \lim |
$$\log$$ | 對數 | \log |
$$\prod$$ | 累乘 | \proc |
$$ \bigcup$$ | 並集 | \bigcup |
$$ \bigcap$$ | 交集 | \bigcap |
$$\frac{1}{2}$$ | 分數線 | \frac{1}{2} |
$\vline$ | 絕對值豎線 | \vline |
$$\sqrt[3]{4}$$ | 根號 | \sqrt[3]{4} |
$$ y = ax + b $$
$$ y =ax + b $$
$$ y=ax^2 + bx + c $$
$$ y = ax^2 + bx + c $$
$$ f(x) = X^2 + Y^2 + Z^2 + C $$
$$ f(x) = X^2 + Y^2 + Z^2 + C $$
$$ \vline AB \vline=\sqrt[2]{{(x_2 - x_1)}^2 + {(y_2 - y_1)}^2} $$
$$ | AB |=\sqrt[2]{{(x_2 - x_1)}^2 + {(y_2 - y_1)}^2} $$
$$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
$$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
$$ \left\{ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right\} \tag{2} $$
$$ \left{ \begin{matrix} 1 & 2 & 3 \ 4 & 5 & 6 \ 7 & 8 & 9 \ \end{matrix} \right} \tag{2} $$