Contents

Markdown Syntax Advanced Feature

Advanced Feature

delete line

1
~~this is not available now~~

this is not available now

superscript

use [^keyword]

1
2
3
for this reference[^footnote]

and this[^footnote2]

for this reference1

and this2

Math Equation

$ inline:

formula using $E=mc^2$ for $E=mc^2$

block equation using $$...$$ or \\[...\\]

1
2
3
$$f(x_1,x_x,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 $$

$$\sum^{j-1}_{k=0} \widehat{\gamma} z_k$$

$$f(x_1,x_x,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 $$

$$\sum^{j-1}_{k=0} \widehat{\gamma} z_k$$

1
2
3
$$ c = \pm\sqrt{a^2 + b^2} $$

\\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \gamma i \xi x} d \xi \\]

$$ c = \pm\sqrt{a^2 + b^2} $$

\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \gamma i \xi x} d \xi \]

visit Katex

chemical equation

mhchem is supported in $ \KaTeX $

1
2
3
4
5
$$ \ce{2 CO + O2 -> 2 CO2} $$

$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$

$$C_p[\ce{H2O(l)}] = \pu{75.3 J // mol K}$$

$$ \ce{2 CO + O2 -> 2 CO2} $$

$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$

$$C_p[\ce{H2O(l)}] = \pu{75.3 J // mol K}$$

enhanced code block

code highlight

1
$ sudo apt-get install vim-gnome

Python :

```python
@requires_authorization
def func(param1='', param2=0):
    '''A docstring'''
    if param1 > param2: # interesting
        print 'Greater'
    return (param2 - param1 + 1) or None

class SomeClass:
    pass

>>> message = '''interpreter
... prompt'''
```
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
@requires_authorization
def func(param1='', param2=0):
    '''A docstring'''
    if param1 > param2: # interesting
        print 'Greater'
    return (param2 - param1 + 1) or None

class SomeClass:
    pass

>>> message = '''interpreter
... prompt'''

JavaScript:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
/**
 * 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));

flowchart

example code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
flow
st=>start: Start:>https://www.zybuluo.com
io=>inputoutput: verification
op=>operation: Your Operation
cond=>condition: Yes or No?
sub=>subroutine: Your Subroutine
e=>end

st->io->op->cond
cond(yes)->e
cond(no)->sub->io

visit:flowchart grammar

sequence

Ex 1

1
2
3
4
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!

Ex 2

1
2
3
4
5
6
sequenceDiagram
Title: Here is a title
A->B: Normal line
B-->C: Dashed line
C->>D: Open arrow
D-->>A: Dashed open arrow

vist:seq diagram

gant diagram

timeline diagram

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
gantt
title project
section a
procedure b :a1, 2016-06-22, 3d
procedure c :after a1, 5d
procedure d : 5d
section b
procedure e :2016-07-05 , 5d
procedure f :2016-07-08, 10d
procedure g :2016-07-15, 10d
procedure h :2016-07-22, 5d
section end
a: 2d
b: 3d

visit:gant diagrams

mermaid flowchart

1
2
3
4
5
graph LR;
A[Hard edge] -->|Link text| B(Round edge)
B --> C{Decision}
C -->|One| D[Result one]
C -->|Two| E[Result two]

Mermaid flowchart

mermaid diagram

1
2
3
4
    Alice->John: Hello John, how are you?
    loop every minute
        John-->Alice: Great!
    end

visit:Mermaid diagram

table

1
2
3
4
5
    | item        | price   |  number  |
    | --------    | -----:  | :----:   |
    | pc          | $1600   |   5      |
    | phone       |   $12   |   12     |
    | other       |    $1   |  234     |
item price number
pc $1600 5
phone $12 12
other $1 234

definition

1
2
3
4
5
name 1
: def 1 (four leading space after :)

codebloc 2
: def 1 (four leading space after :)
name 1
def 1 (four leading space after :)
codebloc 2
def 1 (four leading space after :)
1
        code block(left eight leading space)
    code block(left eight leading space)

Html lable

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    <table>
        <tr>
            <th rowspan="2">a</th>
            <th>b</th>
            <th>c</th>
            <th>d</th>
        </tr>
        <tr>
            <td>1</td>
            <td>2</td>
            <td>3</td>
        </tr>
    </table>
a b c d
1 2 3

Todo list

use [ ] or [x] with nested Markdown

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    - [ ] **Markdown**
        - [ ] a
        - [ ] b
        - [x] c [see also](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments)
        - [x] e
            - [x] f
            - [x] c [see also](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments)
    - [ ] **another one**
        - [ ] item 1
        - [ ] 2
        - [x] 3

Todo list:

  • Markdown

  • another one

    • item 1
    • 2
    • 3

  1. This is the first footnote ↩︎

  2. This is the second footnote ↩︎