其他分享
首页 > 其他分享> > Markdown使用

Markdown使用

作者:互联网

一、块元素

1. 目录(Table of Contents -- TOC)

输入[toc],按回车键

目录

2. 标题

标题有6个等级,用 # 号表示

# 标题1
## 标题2
### 标题3
#### 标题4
##### 标题5
###### 标题6

3. 引用(Blockquotes)

使用 > 字符,表示引用

4. 列表(Lists)

输入 * 将会创建一个无序列表,也可以使用 + 或者 -

5. 代码块

require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

6. 表格(Tables)

使用 | First Header | Second Header | 按回车键,将会创建2列的表格
还可以使用 : 号,来设置文字对齐方式

Left-Aligned Center Aligned Right Aligned
col 3 is some wordy text $1600
col 2 is centered $12
zebra stripes are neat $1

7. 脚注(Footnotes)

创建脚注[1].

8. 段落和结束

大多数 markdown 解析器忽略单行分隔符,为了上其他 markdown 解析器识别行分隔符,可以在末尾使用两个空格,或者插入
第二行

二、Span 元素(Span Elements)

文字描述包含在 [] 内,链接地址包含在 () 内,() 要紧接着 [] 后面

百度一下你就知道

引用链接样式,使用两个 []

[Bing][]
And then define the link:[Bing]: http://bing.com/

3. 图片(Images)

在链接格式前面添加 ! ,如下
九尾灵狐.jpg

3. 强调(Emphasis)

使用 * 或 _ 号

single asterisks
single underscores

如果在 * 号前使用 \

*this text is surrounded by literal asterisks*

4. 加粗(Strong)

使用 ** 或 __ 号

double asterisks
double asterisks

5. 代码(Code)

在文章中现实代码,用 ` 号表示

Use the printf() function.

6. 删除线(Strikethrough)

使用 ~~

删除线

7. 下划线(Underlines)

下划线由 HTML <u><u/> 提供

下划线

8. 高亮(Highlight)

这个功能默认是关闭的,如果要打开这个功能(以 Mac 版本为例),选择 Typora -> 偏好设置 -> markdown 标签,勾选高亮复选框

highlight


  1. 这是脚注文本↩︎

标签:markdown,脚注,Links,标题,Markdown,使用,链接
来源: https://www.cnblogs.com/Dm920/p/13402308.html