Markdown syntax guide and writing on MWeb

简介:

Philosophy

Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

Readability, however, is emphasized above all else. 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.

Markdown's syntax is intended for one purpose: to be used as a format for writing for the web.

Notice

You can use CMD + R to preview the result.

Headers

Example:

# This is an `<h1>` tag
## This is an `<h2>` tag
###### This is an `<h6>` tag

Result:

This is an <h1> tag

This is an <h2> tag

This is an <h6> tag

Emphasis

Example:

*This text will be italic*
_This will also be italic_

**This text will be bold**
__This will also be bold__

*You **can** combine them*

Shortcuts: CMD + UCMD + ICMD + B

Result:

This text will be italic

This will also be italic

This text will be bold

This will also be bold

*You can combine them*

Newlines

End a line with two or more spaces + enter.

Just typing enter to newline,please set:Preferences – Themes – Translate newlines to <br> tags enable ( default is enable )

Lists

Unordered

Example:

* Item 1 unordered list `* + SPACE`
* Item 2
    * Item 2a unordered list `TAB + * + SPACE`
    * Item 2b

Shortcuts: Option + U

Result:

  • Item 1 unordered list * + SPACE
  • Item 2
    • Item 2a unordered list TAB + * + SPACE
    • Item 2b

Ordered

Example:

1. Item 1 ordered list `Number + . + SPACE`
2. Item 2 
3. Item 3
    1. Item 3a ordered list `TAB + Number + . + SPACE`
    2. Item 3b

Result:

  1. Item 1 ordered list Number + . + SPACE
  2. Item 2
  3. Item 3
    1. Item 3a ordered list TAB + Number + . + SPACE
    2. Item 3b

Task lists

Example:

- [ ] task one not finish `- + SPACE + [ ]`
- [x] task two finished `- + SPACE + [x]`

Result:

  •  task one not finish - + SPACE + [ ]
  •  task two finished - + SPACE + [x]

Images

Example:

![GitHub set up](https://help.github.com/assets/images/site/set-up-git.gif)
Format: ![Alt Text](url)

Shortcuts: Control + Shift + I

The Library's document support drag & drop or CMD + V paste or CMD + Option + I to insert the pictrue.

Result:

GitHub set up

Links

Example:

email <example@example.com>
[GitHub](http://github.com)
autolink  <http://www.github.com/>

Shortcuts: Control + Shift + L

The Library's document support drag & drop or CMD + Option + I to insert attachment.

Result:

An email example@example.com link.

GitHub

Automatic linking for URLs

Any URL (like http://www.github.com/) will be automatically converted into a clickable link.

Blockquotes

Example:

As Kanye West said:
> We're living the future so
> the present is our past.

Shortcuts: CMD + Shift + B

Result:

As Kanye West said:

We're living the future so

the present is our past.

Inline code

Example:

I think you should use an
`<addr>` `code` element here instead.

Shortcuts: CMD + K

Result:

I think you should use an

<addr> code element here instead.

Multi-line code

Example:

```js
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }

}
```

Shortcuts: CMD + Shift + K

Result:

function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }

}

Sequence and Flow chart

Example:

```sequence
张三->李四: 嘿,小四儿, 写博客了没?
Note right of 李四: 李四愣了一下,说:
李四-->张三: 忙得吐血,哪有时间写。
```

```flow
st=>start: 开始
e=>end: 结束
op=>operation: 我的操作
cond=>condition: 确认?

st->op->cond
cond(yes)->e
cond(no)->op
```

Result: ( Please enable Preferences – Themes – Enable sequence & flow chart, default is enable. )

张三->李四: 嘿,小四儿, 写博客了没?
Note right of 李四: 李四愣了一下,说:
李四-->张三: 忙得吐血,哪有时间写。
st=>start: 开始
e=>end: 结束
op=>operation: 我的操作
cond=>condition: 确认?

st->op->cond
cond(yes)->e
cond(no)->op

More info: http://bramp.github.io/js-sequence-diagrams/http://adrai.github.io/flowchart.js/

Tables

Example:

First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column

You can create tables by assembling a list of words and dividing them with hyphens – (for the first row), and then separating each column with a pipe |:

Result:

First Header Second Header
Content from cell 1 Content from cell 2
Content in the first column Content in the second column

Strikethrough

Example:

 (like ~~this~~)

Result:

Any word wrapped with two tildes (like this) will appear crossed out.

Horizontal Rules

Following lines will produce a horizontal rule:

***

*****

- - -

Result:




MathJax

Use double US dollors sign pair for Block level Math formula, and one US dollor sign pair for Inline Level.

For example this is a Block level $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$ formula, and this is an inline Level $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ formula.

\\[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}} {1+\ldots} } } } \\]

Result:

For example this is a Block level \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\] formula, and this is an inline Level \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\) formula.

\[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =

1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}

{1+\frac{e^{-8\pi}} {1+\ldots} } } } \]

Footnote

Example:

This is a footnote:[^sample_footnote]

Result:

This is a footnote:1

Comment And Read More..

Actions->Insert Read More Comment OR CMD + .

TOC

Example:

[TOC]

Result:

  • This is an <h1> tag


    1. footnote text detail… ↩

  • 相关文章
    |
    8月前
    |
    程序员 Linux iOS开发
    一款比Typora更简洁优雅的Markdown编辑器神器(完全开源免费)
    一款比Typora更简洁优雅的Markdown编辑器神器(完全开源免费)
    295 1
    |
    8月前
    《使用「Markdown」编辑器的那些天 |CSDN编辑器测评》
    《使用「Markdown」编辑器的那些天 |CSDN编辑器测评》
    82 0
    |
    8月前
    |
    机器学习/深度学习 uml
    Markdown编辑器用法保存自用
    Markdown编辑器用法保存自用
    104 0
    |
    3月前
    |
    Ubuntu Linux 测试技术
    Linux系统之部署轻量级Markdown文本编辑器
    【10月更文挑战第6天】Linux系统之部署轻量级Markdown文本编辑器
    158 1
    Linux系统之部署轻量级Markdown文本编辑器
    |
    2月前
    |
    人工智能 移动开发 前端开发
    Markdown-to-Image:开源的在线 Markdown 转海报编辑器
    Markdown-to-Image 是一款开源的在线 Markdown 转海报编辑器,能够将 Markdown 文本内容转换为图像,适用于创建社交媒体帖子、海报和其他视觉内容。该工具支持多种输出格式,并允许用户自定义样式,适用于多种应用场景。
    90 4
    Markdown-to-Image:开源的在线 Markdown 转海报编辑器
    |
    5月前
    |
    存储 安全 数据安全/隐私保护
    Django 后端架构开发:富文本编辑器权限管理与 UEditor 、Wiki接入,实现 Markdown 文本编辑器
    Django 后端架构开发:富文本编辑器权限管理与 UEditor 、Wiki接入,实现 Markdown 文本编辑器
    203 0
    |
    7月前
    |
    存储 移动开发 编解码
    基于HTML5开发的Markdown在线编辑器
    Markdown是一种轻量级标记语言,以其简洁易读的格式而备受程序员和作者们的青睐。随着互联网的发展,越来越多的在线Markdown编辑器应运而生,为用户提供了更加便捷、高效的写作和编辑环境。本文将探讨基于HTML5开发的Markdown在线编辑器的设计原理、功能特点以及技术优势。
    144 4
    |
    4月前
    |
    JavaScript 前端开发 API
    vue3 v-md-editor markdown编辑器(VMdEditor)和预览组件(VMdPreview )的使用
    本文介绍了如何在Vue 3项目中使用v-md-editor组件库来创建markdown编辑器和预览组件。文章提供了安装步骤、如何在main.js中进行全局配置、以及如何在页面中使用VMdEditor和VMdPreview组件的示例代码。此外,还提供了一个完整示例的链接,包括编辑器和预览组件的使用效果和代码。
    vue3 v-md-editor markdown编辑器(VMdEditor)和预览组件(VMdPreview )的使用
    |
    8月前
    |
    前端开发 C++ iOS开发
    几款主流好用的markdown编辑器介绍
    几款主流好用的markdown编辑器介绍
    433 1