Markdown is a plain text formatting syntax designed so that it can optionally be converted to HTML using a tool by the same name. Markdown is popularly used as format for readme files, or for writing messages in online discussion forums, or in text editors for the quick creation of rich text documents.0
Emacs
read Emacs Markdown Mode for more details
- C-c C-c m: run Markdown on the current buffer and preview the output in another buffer. or you can use C-c C-c p to preview in browser.
- M-x html-mode: move to html-mode on this other buffer.
- M-x sgml-tags-invisible: hide the html tags to display something close to the output.
- Then every time you want to refresh the rendering, simply run again C-c C-c m on the markdown buffer.
quote
a blank line then indent every line will generate
<pre><code></code></pre>
link
[title](link)
![iamge](link)
Another link style which looks like foot note:
[title] [link-id]
[link-id]: link "title"
list
- ul:
{*|+|-}
- ol:
{\d+\.}
you can escape . to avoid ol when you use “^1986. some word”.
table
markdown can generate table easily, but its native css support is too simple to meet my requirement.
table header | header 2
--- | ---
content | content 2
will reproduce the follow content:
table header | header 2 |
---|---|
content | content 2 |
read Markdown Cheatsheet for more details.
Math
add <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default"></script>
in anywhere you like, then write the math formulars. $$formular$$
or inline version \\(formular\\)
. For example, $$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$
will display:
inline version: \(x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\)
License: (CC 3.0) BY-NC-SA