Markdown 高阶语法

Markdown 高阶语法

更加详细的语法参照 Markdown语法说明 (简体中文版)

1. 内容目录

(目前不支持此功能, CSDN可以)
在段落中填写 [TOC] 以显示全文内容的目录结构。

[TOC]

2. 标签分类

在编辑区任意行的列首位置输入以下代码给文稿标签:
标签: 数学 英语 Markdown
或者
Tags: 数学 英语 Markdown

3. 删除线

使用 ~~ 表示删除线。
示例: 这是一段错误的文本。

4. 注脚

使用 [^keyword] 表示注脚
这是一个注脚[1]的样例。
这是第二个注脚[2]的样例。

5. LaTeX 公式

上不能使用 MathJax 编辑公式
---#### Refs

  • [MathJax Basic Tutorial and Quick Reference][mathjax-guide]-

第一个矩阵

$$
\begin{bmatrix}
1 & x & x^2 \
1 & y & y^2 \
1 & z & z^2 \
\end{bmatrix}
$$

来书写一个矩阵。
但是,只要我们想,总还是有方法,只不过要麻烦一点。比如你可以这样:
~~~第二个矩阵
---------![][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],一个矩阵出现了。

写公式的方法:就像上面的【第一个矩阵】一样,把其中 $$ 符号里多余的空格删除,拷贝出来,在前面加上 http://latex.codecogs.com/svg.latex?,然后才能当成一个图片链

公式示例:

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. 加强的代码块

非代码示例:

$ 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. 表格支持

项目 价格 数量
计算机 $1600 5
手机 $12 12
管线 $1 234

  1. 这是一个 注脚文本。 ↩

  2. 这是另一个 注脚文本。 ↩

你可能感兴趣的:(Markdown 高阶语法)