2015年4月10日 星期五

Markdown 介紹及相關資源

簡介


這是官方網站上介紹
Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

Thus, “Markdown” is two things: (1) a plain text formatting syntax; and (2) a software tool, written in Perl, that converts the plain text formatting to HTML. See the Syntax page for details pertaining to Markdown’s formatting syntax. You can try it out, right now, using the online Dingus.

The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.

OpenFoundry 上的介紹
Markdown 是一個輕量的標記語言,主要用於讓人們可以不用 HTML 複雜繁長的語法就能夠標記格式而達到管理文件的目的。Markdown 是由 John Gruber 跟 Aaron Swartz 所創造出來的。他們希望能夠讓人們可以用易讀,易寫的簡單文件格式,透過工具格式化轉成 HTML。經過多年的發展,Markdown 已經成為許多人做筆記的第一選擇了。原因除了其簡潔直觀的語法還有就是長期來慢慢累積出來的周邊工具。Markdown 已經不再僅僅只是用於標記基礎格式的語言了。圍繞著 Markdown 產生出來的工具組已經可以讓這個標記語言作到細緻的排版。已經有為數不少的人用 Markdown 來創造他們的數位著作。知名的源碼版本控制服務網站 GitHub 用 Markdown 作為他們預設支援的文本格式。其它還有許多的服務都支援 Markdown 作為他們優先支援的格式。

Markdown其實是 (1) 一種文本語法 (2) 一個轉化文件成HTML格式的軟體工具,他的工具是用Perl寫成。


教學

  1. markdowntutorial.com:這個網站透過說明跟實際操作分成 italics and bold、Headers、Links、Images、Block quotes、Lists、Paragraphs、Conclusion 八個部分學習 Markdown 的語法及其運作的原理,非常棒的教學網站。
  2. Markdown 官方語法說明 繁體中文版
  3. 简单的Markdown指南:這篇部落格寫得非常簡單一目了然
  4. 簡單易學的Markdown文字標記語法:這篇更簡單XDD


編輯器(註一)

Web
  1. Cmd Markdown:編輯閱讀器,支援即時同步預覽,區分寫作和閱讀模式,支援線上儲存,分享文稿網址。 
  2. Dillinger:一個 Markdown 的線上編輯器,可以即時顯示結果,提供即時預覽以及到 GitHub 和 Dropbox 的拓展連線。 
  3. IPython Notebook:以IPython為後台,利用瀏覽器做IDE,支援Markdown與LaTex公式。
  4. tmpvar:This is an adaption of the github markdown previewer and uses github readme styling
  5. http://jbt.github.io/markdown-editor/:Live (Github-flavored) Markdown Editor,Open Source。
  6. Markable

Desktop
  1. Mou:一個Mac OS X上的Markdown編輯器,十五美金。
  2. MacDown:OS X 上的 Markdown 開源編輯器,作者稱其深受 Mou 啟發。 
  3. WMD:a Javascript "WYSIWYM" editor for Markdown (from AttackLab) 
  4. PageDown:一個 Javascript 寫的 "WYSIWYM" Markdown編輯器 (來自 StackOverflow) 
  5. MarkdownPad:Windows,需要安装 Microsoft .NET Framework 4.0。 
  6. MarkPad
  7. Markdown textarea:GreaseMonkey 脚本,此脚本会在文本域的左下角新增一个 Markdown 按钮,输入各种包含 Markdown 的文字之后,点击它就可以把代码转化为为 HTML。
  8. ReText:Linux,Ubuntu 安裝方法参考这里


GitHub Flavored Markdown

  • GitHub uses "GitHub Flavored Markdown," or GFM, across the site--in issues, comments, and pull requests. It differs from standard Markdown (SM) in a few significant ways, and adds some additional functionality.
  • If you're not already familiar with Markdown, take a look at Markdown Basics
  • If you'd like to know more about features that are available in issues, comments, and pull request descriptions, such as task lists, read Writing on GitHub.
  • Mastering Markdown:這是另一份 Github 教 Markdown 的文件。


相關討論文章

为什么作家应该用 Markdown 保存自己的文稿
Markdown写作浅谈


其它

CommonMark:有人試著標準化 Markdown,這是在他們官網上寫的:「We propose a standard, unambiguous syntax specification for Markdown, along with a suite of comprehensive tests to validate Markdown implementations against this specification. We believe this is necessary, even essential, for the future of Markdown.」。當初他們好像想要用 Standard Markdown 的名字,但讓 Markdown的原創者非常 infuriating,這篇文章是他們的道歉。


註一:工具大部份都整理自台版維基百科


-------------------------------------------------這條線以下未整理QQ------------------------------------------------

Syntax Guides


Converters

The implementations above by default refer to Markdown to XHTML conversion. Converters to and from other formats are also available.
  • Markdown to LaTeX, Markdown+LaTeX to MathML, etc.
  • XHTML to Markdown:
    • html2text.py (in Python)
    • Markdownify (in PHP)
    • Make.text (a bookmarklet which converts any web page into Markdown.)
    • XHTML-to-Markdown XSLT (a stylesheet, works with XHTML only)
    • Pandoc (a Haskell library that can convert between many formats including Markdown, HTML, reStructuredText, LaTeX, MediaWiki and others)
    • html2x (web form and bookmarklet, based on Pandoc)
    • kramdown (Ruby)
  • Other formats to Markdown:
    • Pandoc (a Haskell library that can convert between many formats including Markdown, HTML, reStructuredText, LaTeX, and others)
    • odt2txt (a Python script to convert OpenDocument text files to Markdown)
    • word_markdown_macro (a Microsoft Word macro that converts some of Word’s formatting into Markdown)


Online tools (that means it works in your browser)

  • Dillinger free online markdown editor that supports syncing with Dropbox, Google Drive and Github.
  • Dingus
  • There are many of these tools so if you want to work in a browser, find the one you like best.
  • If you want to turn a website into Markdown, then its easy to do with html2text, or by using the make.text bookmarklet (also see Marky)
  • I really like using gist by github for sharing and collaborating (called forking) on documents. Here's a sample:P
  • Draft is a comprehensive online writing environment that uses Markdown. However, it requires you to create an account and is a bit confusing.


Other Software

HOWTOs

Tests

http://xbeta.org/wiki/show/Markdown
http://whatismarkdown.com