Markdown 介紹

+++

Categories = ["tool",]

Tags = ["tool","Markdown"]

date = "2014-06-19T19:23:58+08:00"

title = "Markdown--語法(1)"

description = ""

+++

Markdown 介紹

Markdown 的目標(biāo)是實現(xiàn)「易讀易寫」??勺x性,無論如何,都是最重要的。

一份使用 Markdown 格式撰寫的文件應(yīng)該可以直接以純文本發(fā)布,并且看起來不會像是由許多標(biāo)簽或是格式指令所構(gòu)成。

Markdown 語法受到一些既有 text-to-HTML 格式的影響,包括 Setext、atx、Textile、reStructuredText、Grutatext 和 EtText,而最大靈感來源其實是純文本電子郵件的格式。

總之, Markdown 的語法全由一些符號所組成,這些符號經(jīng)過精挑細選,其作用一目了然。比如:在文字兩旁加上星號,看起來就像強調(diào)。Markdown 的列表看起來,嗯,就是列表。Markdown 的區(qū)塊引用看起來就真的像是引用一段文字,就像你曾在電子郵件中見過的那樣。

Markdown 官方文檔

創(chuàng)始人John Gruber的 Markdown 語法說明

Markdown 中文版語法說明

工具

1.Mou for Mac (free)

2.Ulysses for Mac (professional)

3.iA writer

4.Tumblr for Mac

5.簡書

Markdown 語法

標(biāo)題

標(biāo)題是每篇文章都需要也是最常用的格式,在 Markdown 中,如果一段文字被定義為標(biāo)題,只要在這段文字前加 # 號即可。以此類推,總共六級標(biāo)題,建議在 # 后面加一個空格,這是最標(biāo)準(zhǔn)的 Markdown 語法。

粗體與斜體

Markdown 的粗體和斜體:用兩個 * 包含一段文本就是粗體的語法,用一個 * 包含一段文本就是斜體的語法。

例如:我是粗體君 我是斜體君

列表

無序列表

在 Markdown 下,列表的顯示只需要在文字前加上 - 或 * 即可變?yōu)闊o序列表;

有序列表

有序列表則直接在文字前加1. 2. 3. 符號要和文字之間加上一個字符的空格。例如:

1.Ordered list item 1

2.Ordered list item 2

3.Ordered list item 3

引用

如果你需要引用一小段別處的句子,就可以采用引用格式,只需要在文本前加入 > 這種尖括號(大于號)即可:

我是引用本體君

要注意符號和文本間的空格

圖片與鏈接

插入鏈接與插入圖片的語法差不多,區(qū)別在于最前方的! 號

圖片為: ![ ]( )

鏈接為: [ ]( )

插入鏈接

度娘

插入圖片

Mou icon

郵箱和純鏈接

An email``link:

Simple inline link``:

表格

My Table | Are | Sucks

:------- | :----------: | ---------:

col 1 | is | left

col 2 | is | center

table | is | boring

代碼框

只需要用兩個 ` 把中間的代碼包裹起來,使用 tab 鍵即縮進。


@interface UINavigationBar (Awesome)

- (void)lt_setBackgroundColor:(UIColor *)backgroundColor;

- (void)lt_setElementsAlpha:(CGFloat)alpha;

- (void)lt_setTranslationY:(CGFloat)translationY;

- (void)lt_reset;

@end 

分割線

分割線的語法只需要3個 * 號,例如:

我在分割線上


我在分割線下

快捷鍵

Mou 的 Help 文檔非常具體,不熟悉的可以前去查看

View

*Toggle live preview: Shift + Cmd + I

*Toggle Words Counter: Shift + Cmd + W

*Toggle Transparent: Shift + Cmd + T

*Toggle Floating: Shift + Cmd + F

*Left/Right = 1/1: Cmd + 0

*Left/Right = 3/1: Cmd + +

*Left/Right = 1/3: Cmd + -

*Toggle Writing orientation: Cmd + L

*Toggle fullscreen: Control + Cmd + F

Actions

*Copy HTML: Option + Cmd + C

*Strong: Select text, Cmd + B

*Emphasize: Select text, Cmd + I

*Inline Code: Select text, Cmd + K

*Strikethrough: Select text, Cmd + U

*Link: Select text, Control + Shift + L

*Image: Select text, Control + Shift + I

*Select Word: Control + Option + W

*Select Line: Shift + Cmd + L

*Select All: Cmd + A

*Deselect All: Cmd + D

*Convert to Uppercase: Select text, Control + U

*Convert to Lowercase: Select text, Control + Shift + U

*Convert to Titlecase: Select text, Control + Option + U

*Convert to List: Select lines, Control + L

*Convert to Blockquote: Select lines, Control + Q

*Convert to H1: Cmd + 1

*Convert to H2: Cmd + 2

*Convert to H3: Cmd + 3

*Convert to H4: Cmd + 4

*Convert to H5: Cmd + 5

*Convert to H6: Cmd + 6

*Convert Spaces to Tabs: Control + [

*Convert Tabs to Spaces: Control + ]

*Insert Current Date: Control + Shift + 1

*Insert Current Time: Control + Shift + 2

*Insert entity <: Control + Shift + ,

*Insert entity >: Control + Shift + .

*Insert entity &: Control + Shift + 7

*Insert entity Space: Control + Shift + Space

*Insert Scriptogr.am Header: Control + Shift + G

*Shift Line Left: Select lines, Cmd + [

*Shift Line Right: Select lines, Cmd + ]

*New Line: Cmd + Return

*Comment: Cmd + /

*Hard Linebreak: Control + Return

Edit

*Auto complete current word: Esc

*Find: Cmd + F

*Close find bar: Esc

Post

*Post on Scriptogr.am: Control + Shift + S

*Post on Tumblr: Control + Shift + T

Export

*Export HTML: Option + Cmd + E

*Export PDF: Option + Cmd + P

相關(guān)工具

用來上傳圖片獲取 URL 地址

在線好用的Markdown工具,為印象筆記而生

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 這邊筆記針對的是Mac上的MarkDown編輯軟件Mou,其他編輯軟件的MarkDown語法可能與此略有差異。 寫...
    華枯榮閱讀 4,505評論 0 6
  • 1 . 標(biāo)題 標(biāo)題有六種字體大?。骸? + 1-6 + 文本” 表示1-6級標(biāo)題; 標(biāo)題 標(biāo)題 標(biāo)題 標(biāo)題 標(biāo)題 ...
    懶眉閱讀 349評論 0 0
  • # Mou![Mou icon](http://25.io/mou/Mou_128.png)## Overview...
    ekg閱讀 593評論 0 0
  • http://www.itdecent.cn/p/1e402922ee32/http://daringfireba...
    小盒盒閱讀 273評論 0 1
  • 第七章 誰是老交情 平時少開口,偶然開口,開口成金。 總是打哈哈,又打哈哈,哈哈了事。 “門清前!門清前!”老曹說...
    生活拾荒者閱讀 286評論 0 0

友情鏈接更多精彩內(nèi)容