Markdown
Introduction
Markdown is a lightweight markup language for creating formatted text using a plain-text-editor.
Block element
For each block, you'd better put a space behind it.
Title
One # indicates a level of the heading. There are six levels in total.
1 | # Example1 |
That is:
Example1
1 | ## EXSubtitle1 |
That is:
EXSubtitle1
Reference
One > indicates this block is a reference.
1 | > Reference example |
That is:
Reference example
Unordered list
One - indicates a line of lists.
1 | - saber |
That is
- saber
- lancer
- berserker
Ordered list
1 | 1. saber |
That is
- saber
- lancer
- berserker
Multilevel list
1 | 1. saber |
That is
- saber
- 1.1 king
- 1.2 queen
- lancer
- 2.1 red
- 2.2 blue
Task list
1 | - [ ] lunch |
That is
- lunch
- play
- sleep
Code block
1 | just occupy```language |
That is
1 | Content |
Languages that code block supports:
- applescript
- shell/bash
- cpp/c
- c#
- java
- javascript/js
- text
- python/py
- sql
- matlab
- go
- css
- delphi
- erlang
- groovy
- coldfusion
- ...
Arithmetic formula
1 | $$ |
That is
$$
\frac{\partial f}{\partial x} = 2\sqrt{a}x
$$
But NexT theme will not show the formula correctly.
Markdown uses LateX to display formula. You just need to put LateX formula between $$
and $$
. See more LateX syntax in LateX.
Table
1 | |name|age|grade| |
That is
name | age | grade |
---|---|---|
Jack | 20 | 80 |
Bob | 20 | 90 |
Changing the style of table
Put the following code before the table. It will change the size of cell.
1 | <style> table th { |
Inline element
Link
1 | [baidu](baidu.com "A search engine") |
That is baidu
Reference link
1 | [baidu][id] |
1 | Please refer to [Link](#Link) |
That is
Please refer to Link
URL
1 | http://www.baidu.com |
That is http://www.baidu.com
Picture link
1 | ![baidu](https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png "baidu logo") |
That is
Italic
1 | *italic* |
That is italic
Bold
1 | **bold** |
That is bold
Line code
1 | `printf()` |
That is printf()
Underline
1 | <u>underline</u> |
That is underline
Superscript
1 | saber<sup>1</sup> |
That is saber1
Subscript
1 | saber<sub>1</sub> |
That is saber1
In the middle
1 | <center> That is </center> |
Line Arithmetic formula
1 | $x$ |
That is $x$
See more LateX syntax in LateX.
Deletion line
1 | ~~aaa~~ |
That is aaa