Java教程

Markdown使用

本文主要是介绍Markdown使用,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

一、块元素

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

输入[toc],按回车键

目录
  • 一、块元素
    • 1. 目录(Table of Contents -- TOC)
    • 2. 标题
    • 3. 引用(Blockquotes)
    • 4. 列表(Lists)
    • 5. 代码块
    • 6. 表格(Tables)
    • 7. 脚注(Footnotes)
    • 8. 段落和结束
  • 二、Span 元素(Span Elements)
    • 1. 链接(Links)
    • 2. 引用链接(Reference Links)
    • 3. 图片(Images)
    • 3. 强调(Emphasis)
    • 4. 加粗(Strong)
    • 5. 代码(Code)
    • 6. 删除线(Strikethrough)
    • 7. 下划线(Underlines)
    • 8. 高亮(Highlight)

2. 标题

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

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

3. 引用(Blockquotes)

使用 > 字符,表示引用

4. 列表(Lists)

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

  • 111
  • 222
  • 333
    输入 1. a. I. 将会创建有序列表
    a. 111
    b. 222
    c. 333

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使用的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!