Markdown 高階語法
更加詳細(xì)的語法參照 Markdown語法說明 (簡(jiǎn)體中文版)
1. 內(nèi)容目錄
(目前簡(jiǎn)書不支持此功能, CSDN可以)
在段落中填寫 [TOC] 以顯示全文內(nèi)容的目錄結(jié)構(gòu)。
[TOC]
2. 標(biāo)簽分類
在編輯區(qū)任意行的列首位置輸入以下代碼給文稿標(biāo)簽:
標(biāo)簽: 數(shù)學(xué) 英語 Markdown
或者
Tags: 數(shù)學(xué) 英語 Markdown
3. 刪除線
使用 ~~ 表示刪除線。
示例: 這是一段錯(cuò)誤的文本。
4. 注腳
使用 [^keyword] 表示注腳
這是一個(gè)注腳[1]的樣例。
這是第二個(gè)注腳[2]的樣例。
5. LaTeX 公式
簡(jiǎn)書上不能使用 MathJax 編輯公式
---#### Refs
- [MathJax Basic Tutorial and Quick Reference][mathjax-guide]-
第一個(gè)矩陣
$$
\begin{bmatrix}
1 & x & x^2 \
1 & y & y^2 \
1 & z & z^2 \
\end{bmatrix}
$$
來書寫一個(gè)矩陣。
但是,只要我們想,總還是有方法,只不過要麻煩一點(diǎn)。比如你可以這樣:
~~~第二個(gè)矩陣
---------![][matrix]
[matrix]: http://latex.codecogs.com/svg.latex?\begin{bmatrix}1&x&x^2\\1&y&y^2\\1&z&z^2\\\end{bmatrix}
就有:![][00],一個(gè)矩陣出現(xiàn)了。
寫公式的方法:就像上面的【第一個(gè)矩陣】一樣,把其中 $$ 符號(hào)里多余的空格刪除,拷貝出來,在前面加上 http://latex.codecogs.com/svg.latex?,然后才能當(dāng)成一個(gè)圖片鏈
公式示例:
01: ![][01]
02: ![][02]
03: ![][03]
04: ![][04]
05: ![][05]
06: ![][06]
07: ![][07]
[00]: http://latex.codecogs.com/png.latex?\begin{bmatrix}1&x&x2\1&y&y2\1&z&z^2\\end{bmatrix}
[01]: http://latex.codecogs.com/png.latex?f(x)=ex+e{-x}}
[02]: http://latex.codecogs.com/png.latex?C_n^k=\frac{n(n-1)\ldots(n-k+1)}{k!}
[03]: http://latex.codecogs.com/svg.latex?\begin{align}\sqrt{37}&=\sqrt{\frac{732-1}{122}}\&=\sqrt{\frac{732}{122}\cdot\frac{732-1}{732}}\&=\sqrt{\frac{732}{122}}\sqrt{\frac{732-1}{732}}\&=\frac{73}{12}\sqrt{1-\frac{1}{732}}\&\approx\frac{73}{12}\left(1-\frac{1}{2\cdot732}\right)\end{align}
[04]: http://latex.codecogs.com/svg.latex?\begin{array}{c|lcr}n&\text{Left}&\text{Center}&\text{Right}\\hline1&0.24&1&125\2&-1&189&-8\3&-20&2000&1+10i\\end{array}
[05]: http://latex.codecogs.com/svg.latex?\mathbb{N,Z,Q,R,C}
[06]: http://latex.codecogs.com/svg.latex?\left{\begin{array}{ll}a_1x+b_1y+c_1z&=d_1+e_1\a_2x+b_2y&=d_2\a_3x+b_3y+c_3z&=d_3\end{array}\right.
[07]: http://latex.codecogs.com/svg.latex?f\left(\left[\frac{1+\left{x,y\right}}{\left(\frac{x}{y}+\frac{y}{x}\right)\left(u+1\right)}+a\right]^{3/2}\right)
源碼為
01: ![][01]
02: ![][02]
03: ![][03]
04: ![][04]
05: ![][05]
06: ![][06]
07: ![][07]
[00]: http://latex.codecogs.com/png.latex?\begin{bmatrix}1&x&x^2\\1&y&y^2\\1&z&z^2\\\end{bmatrix}
[01]: http://latex.codecogs.com/png.latex?f(x)=e^x+e^{-x}}
[02]: http://latex.codecogs.com/png.latex?C_n^k=\frac{n(n-1)\ldots(n-k+1)}{k!}
[03]: http://latex.codecogs.com/svg.latex?\begin{align}\sqrt{37}&=\sqrt{\frac{73^2-1}{12^2}}\\&=\sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}}\\&=\sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}}\\&=\frac{73}{12}\sqrt{1-\frac{1}{73^2}}\\&\approx\frac{73}{12}\left(1-\frac{1}{2\cdot73^2}\right)\end{align}
[04]: http://latex.codecogs.com/svg.latex?\begin{array}{c|lcr}n&\text{Left}&\text{Center}&\text{Right}\\\hline1&0.24&1&125\\2&-1&189&-8\\3&-20&2000&1+10i\\\end{array}
[05]: http://latex.codecogs.com/svg.latex?\mathbb{N,Z,Q,R,C}
[06]: http://latex.codecogs.com/svg.latex?\left\{\begin{array}{ll}a_1x+b_1y+c_1z&=d_1+e_1\\a_2x+b_2y&=d_2\\a_3x+b_3y+c_3z&=d_3\end{array}\right.
[07]: http://latex.codecogs.com/svg.latex?f\left(\left[\frac{1+\left\{x,y\right\}}{\left(\frac{x}{y}+\frac{y}{x}\right)\left(u+1\right)}+a\right]^{3/2}\right)
6. 加強(qiáng)的代碼塊
非代碼示例:
$ sudo apt-get install vim-gnome
Python 示例:
@requires_authorization
def somefunc(param1='', param2=0):
'''A docstring'''
if param1 > param2: # interesting
print 'Greater'
return (param2 - param1 + 1) or None
class SomeClass:
pass
>>> message = '''interpreter
... prompt'''
JavaScript 示例:
/**
* nth element in the fibonacci series.
* @param n >= 0
* @return the nth element, >= 0.
*/
function fib(n) {
var a = 1, b = 1;
var tmp;
while (--n >= 0) {
tmp = a;
a += b;
b = tmp;
}
return a;
}
document.write(fib(10));
7. 表格支持
| 項(xiàng)目 | 價(jià)格 | 數(shù)量 |
|---|---|---|
| 計(jì)算機(jī) | $1600 | 5 |
| 手機(jī) | $12 | 12 |
| 管線 | $1 | 234 |