MarkDown语言的使用_追逐梦想的顾咏丰_新浪博客

风靡网络的文本编辑语言 MarkDown ,可谓是编辑工作的救命稻草,简单的语法使得人们能从繁琐的格式调整中解放出来,更专注于文本内容本身。要知道 GitHub,StackOverflow 等网站的评论和文本编辑都使用了 MarkDown 语言,它真的是一把利器,减少了我们编辑文字时的巨大压力。

以下教程是我空余时间在 GitHub 上写(项目  https://github.com/Gu-Youngfeng/MarkDownEditor)的,主要由介绍了 MarkDown 语言的 10 种标记,包括标题 Title,表格 Table,图片 Image 等 10 种,我觉得掌握了这些常用的标记符号,已经够了。于时间紧凑,我懒得翻译了,粘贴如下,

MarkDown Editor

This Project provides the MD(MarkDown) language environment in GitHub. It saves my basic MD files online.

Introduction

MarkDown is a very easy editing language, which appears in almost every large website, such as GitHub, and StackOverflow. More and more people find it very easy and simple to write files using this language, because we can spend more time focusing on the word itself rather than the complicated formats. Fortunately, we can totally master it by spending only 5 minutes.

Tutorials

We also provide some tutorials to the beginners, they are,

Syntax

Here are some syntax and notes you should pay attention to while writing this language.

1. Title 标题

We have three kinds of title styles, we only need add symbol ###### in front of title context.

 this is an H1
this is an H2

EXAMPLE:

this is an H1

this is an H2

2. Equation 引用

We can easily implement the equation if we want to reference some words. Adding > in front of the equation.

 China is sending an envoy and delegation to North Korea - A big move, we'll see what happens!. 
- Trump

EXAMPLE:

China is sending an envoy and delegation to North Korea - A big move, we'll see what happens!.

  • Trump

3. Listings 列表

We use +-, and \* to mark the listings, and all these three symbol have the same result.

 Goldman Sachs CEO says U.K. should vote again on Brexit. 
VW has a $12B plan for electric cars in China.
Semens is cutting 6,900 jobs.

EXAMPLE:

  • Goldman Sachs CEO says U.K. should vote again on Brexit.
  • VW has a $12B plan for electric cars in China.
  • Semens is cutting 6,900 jobs.

4. Code 代码

We have simple to way to demostrate the different code segments by inserting code into ```{:code} ```.


public static void main(String[] args){
   System.out.println("Hello, MarkDown!");
}

EXAMPLE:

public static void main(String[] args){ 
   System.out.println("Hello, MarkDown!"); 
}

5. Link 链接

If we want to refer to a website in our text, we'd better use [:name](:links) to show the website links. Click the hyper-links we can redirect to the website.

We can visit [Baidu](http:www.baidu.com), but we cannot visit [google](http://www.google.com/) in China.

EXAMPLE:

We can visit Baidu but we cannot visit google in China.

6. Table 表格

Table is a common elements in our daily word file. In MarkDown, we can implement it in the following way.

 BOOK NAME AUTHOR PRESS PRICE 

Intro. to GITHUB Hongji Dazhong Posts&Telecom ¥39.00
Intro. to MarkDown MingmingWuhan Uni. ¥50.00

EXAMPLE:

BOOK NAME AUTHOR PRESS PRICE
Intro. to GITHUB Hongji Dazhong Posts&Telecom ¥39.00
Intro. to MarkDown Mingming Wuhan Uni. ¥50.00

7. Image 图片

To rich the text we have writed or improve the word's readability, and the method of inserting a image is similar to that of inserting a link.

![picture](imgs/readme.jpg)

EXAMPLE:

MarkDown语言的使用

8. Mathematical 数学公式

The syntax of MarkDown is the same with LaTeX(such as youdao cloud and cmd Markdown), so all the symbols are list in the file docs. But we must note that some MD compilers CANNOT get the right results using LaTeX directly(such as GitHub and StackOverflow), so in that time we can only use HTML symbols to replace part of them.

 +  = 

EXAMPLE:

α + β = γ

9. CheckBox 勾选框

MarkDown can provide the function of checkbox when you want to emphase some points, using - [ ] or - [x]

 buy a book. 
play a game.

EXAMPLE:

  •  buy a book.
  •  play a game.

10. Footnote 脚注

When we want to explain some terms or events, we can use footnote which record in the bottom of the pages. using [^ ] to keep note

We want to reference a paper  here.
Gu, Yongfeng, J. Xuan, and T. Qian. "Automatic Reproducible Crash Detection." SATE 2016, 2016:48-53.

EXAMPLE:

We want to reference a paper [1] here. 

[1]: Gu, Yongfeng, J. Xuan, and T. Qian. "Automatic Reproducible Crash Detection." SATE 2016, 2016:48-53.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值