無(wú)標(biāo)題文章

Sample Markdown Cheat Sheet


===========================



This is a sample markdown file to help you write Markdown quickly :)



If you use the fabulous [Sublime Text 2/3 editor][ST] along with the [Markdown Preview plugin][MarkdownPreview], open your ST2 Palette with `CMD+?+P` then choose `Markdown Preview in browser` to see the result in your browser.



## Text basics


this is *italic* and this is **bold** .? another _italic_ and another __bold__



this is `important` text. and percentage signs : % and `%`



This is a paragraph with a footnote (builtin parser only). [^note-id]



Insert `[ TOC ]` without spaces to generate a table of contents (builtin parsers only).



## Indentation


> Here is some indented text


>> even more indented



## Titles


# Big title (h1)


## Middle title (h2)


### Smaller title (h3)


#### and so on (hX)


##### and so on (hX)


###### and so on (hX)



## Example lists (1)



?- bullets can be `-`, `+`, or `*`


?- bullet list 1


?- bullet list 2


??? - sub item 1


??? - sub item 2



??????? with indented text inside



?- bullet list 3


?+ bullet list 4


?* bullet list 5



## Links



This is an [example inline link](http://lmgtfy.com/) and [another one with a title](http://lmgtfy.com/ "Hello, world").



Links can also be reference based : [reference 1][ref1] or [reference 2 with title][ref2].



References are usually placed at the bottom of the document



## Images



A sample image :



![revolunet logo](http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg "revolunet logo")



As links, images can also use references instead of inline links :



![revolunet logo][revolunet-logo]




## Code



It's quite easy to show code in markdown files.



Backticks can be used to `highlight` some words.



Also, any indented block is considered a code block.? If `enable_highlight` is `true`, syntax highlighting will be included (for the builtin parser - the github parser does this automatically).



??? <script>


??????? document.location = 'http://lmgtfy.com/?q=markdown+cheat+sheet';


??? </script>



## Math



When `enable_mathjax` is `true`, inline math can be included \\(\frac{\pi}{2}\\) $\pi$



Alternatively, math can be written on its own line:



$$F(\omega) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} f(t) \, e^{ - i \omega t}dt$$



\\[\int_0^1 f(t) \mathrmnflflbft\\]



\\[\sum_j \gamma_j^2/d_j\\]





## GitHub Flavored Markdown



If you use the Github parser, you can use some of [Github Flavored Markdown][gfm] syntax :



?* User/Project@SHA: revolunet/sublimetext-markdown-preview@7da61badeda468b5019869d11000307e07e07401


?* User/Project#Issue: revolunet/sublimetext-markdown-preview#1


?* User : @revolunet



Some Python code :



```python


import random



class CardGame(object):


??? """ a sample python class """


??? NB_CARDS = 32


??? def __init__(self, cards=5):


??????? self.cards = random.sample(range(self.NB_CARDS), 5)


??????? print 'ready to play'


```



Some Javascript code :



```js


var config = {


??? duration: 5,


??? comment: 'WTF'


}


// callbacks beauty un action


async_call('/path/to/api', function(json) {


??? another_call(json, function(result2) {


??????? another_another_call(result2, function(result3) {


??????????? another_another_another_call(result3, function(result4) {


??????????????? alert('And if all went well, i got my result :)');


??????????? });


??????? });


??? });


})


```



The Github Markdown also brings some [nice Emoji support][emoji] : :+1: :heart: :beer:



[^note-id]: This is the text of the note.



## Parsers and Extensions



Markdown Preview comes with **Python-Markdown** preloaded.



### *Python-Markdown*



The [Python-Markdown Parser][] provides support for several extensions.



[Python-Markdown Parser]: https://github.com/waylan/Python-Markdown



#### Extra Extensions



* `abbr` -- [Abbreviations][]


* `attr_list` -- [Attribute Lists][]


* `def_list` -- [Definition Lists][]


* `fenced_code` -- [Fenced Code Blocks][]


* `footnotes` -- [Footnotes][]


* `tables` -- [Tables][]


* `smart_strong` -- [Smart Strong][]



[Abbreviations]: http://pythonhosted.org/Markdown/extensions/abbreviations.html


[Attribute Lists]: http://pythonhosted.org/Markdown/extensions/attr_list.html


[Definition Lists]: http://pythonhosted.org/Markdown/extensions/definition_lists.html


[Fenced Code Blocks]: http://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html


[Footnotes]: http://pythonhosted.org/Markdown/extensions/footnotes.html


[Tables]: http://pythonhosted.org/Markdown/extensions/tables.html


[Smart Strong]: http://pythonhosted.org/Markdown/extensions/smart_strong.html




You can enable them all at once using the `extra` keyword.



??? extensions: [ 'extra' ]



If you want all the extras plus the `toc` extension,


your settings would look like this:



??? {


??????? ...


??????? parser: 'markdown',


??????? extensions: ['extra', 'toc'],


??????? ...


??? }




#### Other Extensions



There are also some extensions that are not included in Markdown Extra


but come in the standard Python-Markdown library.



* `code-hilite` -- [CodeHilite][]


* `html-tidy` -- [HTML Tidy][]


* `header-id` -- [HeaderId][]


* `meta_data` -- [Meta-Data][]


* `nl2br` -- [New Line to Break][]


* `rss` -- [RSS][]


* `sane_lists` -- [Sane Lists][]


* `smarty` -- [Smarty][]


* `toc` -- [Table of Contents][]


* `wikilinks` -- [WikiLinks][]



[CodeHilite]:? http://pythonhosted.org/Markdown/extensions/code_hilite.html


[HTML Tidy]:? http://pythonhosted.org/Markdown/extensions/html_tidy.html


[HeaderId]:? http://pythonhosted.org/Markdown/extensions/header_id.html


[Meta-Data]:? http://pythonhosted.org/Markdown/extensions/meta_data.html


[New Line to Break]:? http://pythonhosted.org/Markdown/extensions/nl2br.html


[RSS]:? http://pythonhosted.org/Markdown/extensions/rss.html


[Sane Lists]:? http://pythonhosted.org/Markdown/extensions/sane_lists.html


[Table of Contents]:? http://pythonhosted.org/Markdown/extensions/toc.html


[WikiLinks]:? http://pythonhosted.org/Markdown/extensions/wikilinks.html


[Smarty]: https://pythonhosted.org/Markdown/extensions/smarty.html



#### 3rd Party Extensions



*Python-Markdown* is designed to be extended.



Some included ones are:



* `delete` -- github style delte support via `~~word~~`


* `githubemoji` --? github emoji support


* `tasklist` -- github style tasklists


* `magiclink` -- github style auto link conversion of http|ftp links


* `headeranchor` -- github style header anchor links


* `github` -- Adds the above extensions in one shot


* `b64` -- convert and embed local images to base64.? Setup by adding this `b64(base_path=${BASE_PATH})`



There are also a number of others available:



Just fork this repo and add your extensions inside the `.../Packages/Markdown Preview/markdown/extensions/` folder.



Check out the list of [3rd Party extensions](


https://github.com/waylan/Python-Markdown/wiki/Third-Party-Extensions).




#### Default Extensions



The default extensions are:



* `footnotes` -- [Footnotes]


* `toc` -- [Table of Contents]


* `fenced_code` -- [Fenced Code Blocks]


* `tables` -- [Tables]



Use the `default` keyword, to select them all.


If you want all the defaults plus the `definition_lists` extension,


your settings would look like this:



??? {


??????? ...


??????? parser: 'markdown',


??????? extensions: ['default', 'definition_lists'],


??????? ...


??? }



## Examples



### Tables



The `tables` extension of the *Python-Markdown* parser is activated by default,


but is currently **not** available in *Markdown2*.



The syntax was adopted from the [php markdown project](http://michelf.ca/projects/php-markdown/extra/#table),


and is also used in github flavoured markdown.



| Year | Temperature (low) | Temperature (high) | ?


| ---- | ----------------- | -------------------| ?


| 1900 |?????????????? -10 |???????????????? 25 | ?


| 1910 |?????????????? -15 |???????????????? 30 | ?


| 1920 |?????????????? -10 |???????????????? 32 | ?




### Wiki Tables



If you are using *Markdown2* with the `wiki-tables` extra activated you should see a table below:



|| *Year* || *Temperature (low)* || *Temperature (high)* || ?


||?? 1900 ||???????????????? -10 ||?????????????????? 25 || ?


||?? 1910 ||???????????????? -15 ||?????????????????? 30 || ?


||?? 1920 ||???????????????? -10 ||?????????????????? 32 || ?




### Definition Lists



This example requires *Python Markdown*'s `def_list` extension.



Apple


:?? Pomaceous fruit of plants of the genus Malus in


??? the family Rosaceae.



Orange


:?? The fruit of an evergreen tree of the genus Citrus.




## About



This plugin and this sample file is proudly brought to you by the [revolunet team][revolunet]



?[ref1]: http://revolunet.com


?[ref2]: http://revolunet.com "rich web apps"


?[MarkdownREF]: http://daringfireball.net/projects/markdown/basics


?[MarkdownPreview]: https://github.com/revolunet/sublimetext-markdown-preview


?[ST]: http://sublimetext.com


?[revolunet]: http://revolunet.com


?[revolunet-logo]: http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg "revolunet logo"


?[gfm]: http://github.github.com/github-flavored-markdown/


?[emoji]: http://www.emoji-cheat-sheet.com/



最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子惨寿,更是在濱河造成了極大的恐慌,老刑警劉巖这难,帶你破解...
    沈念sama閱讀 206,214評(píng)論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異葡秒,居然都是意外死亡雁佳,警方通過(guò)查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,307評(píng)論 2 382
  • 文/潘曉璐 我一進(jìn)店門同云,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人堵腹,你說(shuō)我怎么就攤上這事炸站。” “怎么了疚顷?”我有些...
    開(kāi)封第一講書人閱讀 152,543評(píng)論 0 341
  • 文/不壞的土叔 我叫張陵旱易,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我腿堤,道長(zhǎng)阀坏,這世上最難降的妖魔是什么? 我笑而不...
    開(kāi)封第一講書人閱讀 55,221評(píng)論 1 279
  • 正文 為了忘掉前任笆檀,我火速辦了婚禮忌堂,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘酗洒。我一直安慰自己士修,他們只是感情好枷遂,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,224評(píng)論 5 371
  • 文/花漫 我一把揭開(kāi)白布。 她就那樣靜靜地躺著棋嘲,像睡著了一般酒唉。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上沸移,一...
    開(kāi)封第一講書人閱讀 49,007評(píng)論 1 284
  • 那天痪伦,我揣著相機(jī)與錄音,去河邊找鬼雹锣。 笑死网沾,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的笆制。 我是一名探鬼主播绅这,決...
    沈念sama閱讀 38,313評(píng)論 3 399
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼在辆!你這毒婦竟也來(lái)了证薇?” 一聲冷哼從身側(cè)響起,我...
    開(kāi)封第一講書人閱讀 36,956評(píng)論 0 259
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤匆篓,失蹤者是張志新(化名)和其女友劉穎浑度,沒(méi)想到半個(gè)月后,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體鸦概,經(jīng)...
    沈念sama閱讀 43,441評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡箩张,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,925評(píng)論 2 323
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了窗市。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片先慷。...
    茶點(diǎn)故事閱讀 38,018評(píng)論 1 333
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖咨察,靈堂內(nèi)的尸體忽然破棺而出论熙,到底是詐尸還是另有隱情,我是刑警寧澤摄狱,帶...
    沈念sama閱讀 33,685評(píng)論 4 322
  • 正文 年R本政府宣布脓诡,位于F島的核電站,受9級(jí)特大地震影響媒役,放射性物質(zhì)發(fā)生泄漏祝谚。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,234評(píng)論 3 307
  • 文/蒙蒙 一酣衷、第九天 我趴在偏房一處隱蔽的房頂上張望交惯。 院中可真熱鬧,春花似錦、人聲如沸商玫。這莊子的主人今日做“春日...
    開(kāi)封第一講書人閱讀 30,240評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)拳昌。三九已至袭异,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間炬藤,已是汗流浹背御铃。 一陣腳步聲響...
    開(kāi)封第一講書人閱讀 31,464評(píng)論 1 261
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留沈矿,地道東北人上真。 一個(gè)月前我還...
    沈念sama閱讀 45,467評(píng)論 2 352
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像羹膳,于是被迫代替她去往敵國(guó)和親睡互。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,762評(píng)論 2 345

推薦閱讀更多精彩內(nèi)容

  • chenwei980閱讀 152評(píng)論 0 1
  • 不經(jīng)意的遇見(jiàn)那是緣分陵像,裝作陌生的兩個(gè)人那叫錯(cuò)過(guò)就珠。游蕩在每一條街道上,擁擠在不同的公交車?yán)镄延保叱鞣N曲風(fēng)的調(diào)子妻怎。一...
    Ailyt閱讀 229評(píng)論 0 1
  • 每日壁紙路徑,復(fù)制出來(lái)就可以 /data/data/com.google.android.apps.wallpap...
    o知否知否閱讀 1,611評(píng)論 0 0
  • 我要講彩票故事榛丢,我要吸引更多同頻的人關(guān)注彩票,關(guān)注彩票的公益性挺庞,我要為彩票正名晰赞。 那么,我的故事挠阁,從什么時(shí)候開(kāi)始講...
    王小暖LOTTERY閱讀 513評(píng)論 2 3
  • 很多同學(xué)的PS4設(shè)備要聯(lián)網(wǎng)玩線上游戲,延遲很高溯饵。PS4自身不能安裝加速器侵俗,如果通過(guò)其他辦法,又糾結(jié)是用梯子加速還是...
    猴哥哥閱讀 21,179評(píng)論 2 5