Markdown intro

Markdown syntax guide.

Markdown syntax practice

Font

- *Italic* or _Italic_
- **Bold**
- ***Italic and Bold***
- ~~DELETE LINE~~

Result:

Italic

Bold

Italic and bold

DELETE LINE


Titles

# Main title
## Sub-title
### Sub-sub-title
...

Welcome to [a_link](http://a_link_address.com "a_hover_display_message")

Result: Welcome to a_link


[Link1][1]
[Link2][2]
[Link3][3]

[1]:http://www.google.com "Google"
[2]:http://github.com "Github"
[3]:http://purdue.edu "Purdue"

Result:

Google:Link1

Github:Link2

Purdue:Link3


<a_sample_link_covered_by_a_pair_of_'<>'>
<[email protected]>

Result:

<www.google.com>

[email protected]


Index

Code:

# 0. TOC{#index}

jump to [TOC](#index)

Reulst:

Jump to Main title

Jump to Font


List

1. A disorder list

Code:

- element 1
- element 2
- element 3

Result:

  • element 1
  • element 2
  • element 3

2. A ordered list

Code:

1. element 1
2. element 2
3. element 3

Result:

  1. element 1
  2. element 2
  3. element 3

3. Defining list

Code:

Code block 1
:   This is the definition of the 'Code block 1'

        The code block of 'Code block 1'

Result:

Code block 1
This is the definition of the ‘Code block 1’
The code block of 'Code block 1'

4. List indentation

Code:

*   Some text.
*   Some other text.
*   Some other text.
*   Some other text.

Result:

  • Some text.
  • Some other text.
  • Some other text.
  • Some other text.

5. List including paragraph

Code:

* Title:
    > Paragraph 1

    > Paragraph 2

Result:

* Title:
    > Paragraph 1

    > Paragraph 2

Table

Implement:

|1st block|2nd block|3rd block|
|-|-|
|3rd block|4th block|5th block|
|6th block|7th block|8th block|

Result:

1st block2nd block3rd block
3rd block4th block5th block
6th block7th block8th block

Quotation

Code:

> Quote with 2 phrases.
> Phrase 1, sentence 1.
> Phrase 1, sentence 2.
>
> Phrase 2, sentence 1.
> Phrase 2, sentence 2.

Result:

Quote with 2 phrases. Phrase 1, sentence 1. Phrase 1, sentence 2.

Phrase 2, sentence 1. Phrase 2, sentence 2.

Or:

> Quote with 2 phrases.
Phrase 1, sentence 1.
Phrase 1, sentence 2.

> Phrase 2, sentence 1.
Phrase 2, sentence 2.

Result:

Quote with 2 phrases. Phrase 1, sentence 1. Phrase 1, sentence 2.

Phrase 2, sentence 1. Phrase 2, sentence 2.

Quotation levels

Code:

> 1st level.
>> 2nd level.
>>> 3rd level.

Result:

1st level.

2nd level.

3rd level.

Quote other elements

Quotation supports other markdown syntaxes, including title, lists, code blocks, etc.

Code:

> 1. First element of a list.
> 2. 2nd element of a list.
> Some sample codes:
    return shell_exec("echo $input | $markdown_script");

Result:

  1. First element of a list.
  2. 2nd element of a list. Some sample codes. return shell_exec(“echo $input | $markdown_script”);

Insert Image

In-line

Code:

![image](image@address "title_of_the_image")

Result:

A sample image

Reference

Code:

![sample_image][picture1]

[picture1]:https://c4.wallpaperflare.com/wallpaper/373/465/123/watchmen-dr-manhattan-wallpaper-preview.jpg "sample image"

Result:

A sample image

Table of content

Insert ‘[TOC]’ to show the table of content.

Foot note

Code:

Add a foot note like this[^1]

[^1]:A sample foot note.

Result:

Add a foot note like this1

Insert formula

Single-line

Code:

Use a '&' to represent a formula. E.g.: $E=mc^2$

Result:

Use a ‘&’ to represent a formula. E.g.: $E=mc^2$

Multiline

Code:

$$\sum_{i=1}^n a_i=0$$
$$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}_{kj} z_k}$$

Result:

$$\sum_{i=1}^n a_i=0$$ $$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}{kj} z_k}$$

Seperation line

Code:

***
* * *
---
------------

Result:


Code block

In-line code

Code:

Sample: A name of a function 'print()'

Result:

Sample: A name of a function ‘print()’.

By indentation

Code:

    #include <stdio.h>
    int main(void)
    {
        printf("Hello world\n");
    }

Result:

#include <stdio.h>
int main(void)
{
    printf("Hello world\n");
}

HTML

You can use HTML language to code your markdown file.

For full guide, go to: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet


  1. A sample foot note. ↩︎

Licensed under CC BY-NC-SA 4.0
Powered by Ignorance.