How to write Markdown

Markdown Introduction

Foreward

Markdown is a lightweight markup language, founded by John Gruber. It allows people to “write documents in plain text format that is easy to read and write, and then convert them into valid XHTML (or HTML) documents.”

Markdown Syntax

Insert picture

Syntax: ![Alt Text](url)

Example: ```
Demo Image

1
2
3
4
5
6
7
8
9
10
11
12

**Sample result:**

![Demo Image](http://image.wolfnx.com/markdown.jpg)

### Newline

The newline entered in the Markdown text is removed from the final generated result, and the browser automatically wraps based on the available space. If you want to force a line break, you can insert at least two spaces at the end of the line.

## Formatted text

**Example:**

斜体字

这也是斜体字

强调

这也是强调

同时使用强调和斜体

删除线

插入行内代码 public class

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

**Sample result:**

*斜体字*

_这也是斜体字_

**强调**

这也是__强调__

同时*使用__强调__和斜体*

~~删除线~~

插入行内代码 ``public class``

## Title

A specific number of pound signs ('#') can be entered before the title content to achieve a corresponding level of HTML-style title (HTML provides a six-level title). When you export to a PDF file using Typora, the article directory is generated from the title.

**Example:**

First level heading

Secondary title

Six r-level headings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

**Sample result:**

# First level heading
## Secondary title
...
###### Six r-level headings

## Break Line

If you need to force a line break (line feed) somewhere in the Markdown document, you can add a line break label ``<br/>``.

## Reference

The reference only needs to add the right angle bracket ('>') at the beginning of the quoted content paragraph. You can choose to add only one at the beginning. You can also add one in front of each line, the effect is the same.

**Example:**

Markdown is a lightweight markup language, founded by John Gruber.
It allows people to “write documents in plain text format that is easy to read and write,
and then convert them into valid XHTML (or HTML) documents.

1
2
3
4
5
6
7
8
9
10
11
12
13

**Sample result:**

> Markdown is a lightweight markup language, founded by John Gruber.
> It allows people to "write documents in plain text format that is easy to read and write,
> and then convert them into valid XHTML (or HTML) documents.


## Link

**Example:**
``` markdown
[Markdown](https://zh.wikipedia.com/wiki/Markdown)

Sample result: Markdown

Horizontal partition line

Example:

1
2
3
4
5
* * *
***
*****
- - -
___

Sample result:






List

Unordered list:

Example:

1
2
3
4
* Item 1
* Item 2
* Item 2a
* Item 2b

Sample result:

  • Item 1
  • Item 2
    • Item 2a
    • Item 2b

Ordered list:

Example:

1
2
3
4
5
1. Item 1
2. Item 2
3. Item 3
* Item 3a
* Item 3b

Sample result:

  1. Item 1
  2. Item 2
  3. Item 3
    • Item 3a
    • Item 3b

Code Highlight

Example:

Code Highlighting Sample

Sample result:

1
2
3
4
5
public class Demo {
public static void main(String[] args) {
System.out.println("hello world!");
}
}

Escape

Markdown uses the backslash \ for escaping. Symbols that support escaping include \ ` * _ { } [ ] ( ) # + - . !. To insert a space, use `` 

Example:

1
\*literal asterisks\*

Sample result:
*literal asterisks*

Form

Example:

1
2
3
4
First Header  | Second Header | Third Header
------------- | ------------- | ------------
Content Cell | Content Cell | Content Cell
Content Cell | Content Cell | Content Cell

Sample result:

First Header Second Header Third Header
Content Cell Content Cell Content Cell
Content Cell Content Cell Content Cell

Editing tool

Support Chinese, easy to export to PDF file

Domestic Markdown editor

Native support Markdown, use the shortcut Ctrl + Shift + M to preview the effect in real time

Markdown preview plugin can be installed as needed

Reference

  1. https://zh.wikipedia.org/wiki/Markdown
  2. https://guides.github.com/features/mastering-markdown/
  3. http://wowubuntu.com/markdown/

Please indicate the source:http://www.wolfnx.com/2017/04/14/Markdown

Autor : wolfnx

Author Email : wolfnx@outlook.com

Click Me