文章目录
  1. 1. 编辑器
  2. 2. 常用语法速查

编辑器

由于使用sublime,因此博主使用的是sublime的插件ominiMarkupPreviewer进行编辑

  1. 在线

  2. 本地

常用语法速查

  1. 标题 (Headings)

    1
    2
    3
    # 这是 H1 <一级标题>
    ## 这是 H2 <二级标题>
    ###### 这是 H6 <六级标题>
  2. 文字格式 (Styling text)

    1
    2
    3
    4
    **这是文字粗体格式**
    *这是文字斜体格式*
    _这是文字粗斜体格式_
    ~~在文字上添加删除线~~

    这是文字粗体格式
    这是文字斜体格式
    这是文字粗斜体格式
    在文字上添加删除线

  3. 列表 (List)

    • 无序列表

      1
      2
      3
      * 项目1
      * 项目2
      * 项目3
    • 有序列表

      1
      2
      3
      4
      5
      1. 项目1
      2. 项目2
      3. 项目3
      * 项目1
      * 项目2
  4. 引用 (Blockquotes)

    1
    2
    3
    4
    #可以不用每行都写一个
    > Pardon my french
    #可以嵌套
    >> asdfasdf

    Pardon my french

    Echo1 Here
    

    asdfasdf

  5. 段落缩进

    1
    2
    3
    &ensp;或&#8194;半方大的空白
    &emsp;或&#8195;全方大的空白
    不断行的空白格&nbsp;或&#160;不断行的空白格

      段落:半方大的空白
      段落:全方大的空白
    不断行的空白格  不断行的空白格

  6. github特有的markdown格式
    https://guides.github.com/features/mastering-markdown/
    https://help.github.com/articles/github-flavored-markdown
    https://help.github.com/articles/writing-on-github
    比如 emoji: :sparkles: :camel: :boom:

    • [x] This is a complete item
    • [ ] This is an incomplete item
      hexo中使用emoji
      1
      2
      3
      4
      5
      {% emoji heart 32 custom_class1,custom_class2 %}
      {% emoji-block %}

      Lorem ipsum dolor sit amet :smiley:
      consectetur adipisicing elit :boom:
      {% endemoji-block %}
  7. 图像

    1
    ![example](http://leanote.com/public/upload/528/5467be5d38f411286b00007b/images/logo/bbd3593e5c2bd29e129c0eb740193969.jpeg)

    example

    图片居中

    1
    2
    3
    #上面加一个
    <div style="text-align:center" markdown="1">
    ![example](http://leanote.com/public/upload/528/5467be5d38f411286b00007b/images/logo/bbd3593e5c2bd29e129c0eb740193969.jpeg)


    example

    如果拷贝了别人的图片插入到自己的博客中,最好在图片上给出一个超链接指向源头,方便追溯出处。

    1
    [![example](http://leanote.com/public/upload/528/5467be5d38f411286b00007b/images/logo/bbd3593e5c2bd29e129c0eb740193969.jpeg "haroopad")](http://blog.leanote.com/post/freewalk/Markdown-语法手册)

    example

  8. 链接

    • 自动式

      1
      <http://example.com/>

      http://example.com/

    • 行内式

      1
      [Display_Text](http://example.com/ "http://example.com/")
    • 参考式

      1
      2
      我经常去的几个网站[Leanote][1] 
      [Leanote 笔记][1]
    • 锚点
      用普通的html

      1
      <a href="#end">bookmark_text</a>

      效果: bookmark_text

  9. 注脚 1

    1
    2
    3
    4
    5
    6
    注脚与注脚之间必须空一行,不然会失效
    使用 Markdown[^1]可以效率的书写文档, 直接转换成 HTML[^2], 你可以使用 Leanote[^Le] 编辑器进行书写。

    被添加脚注的词条后面会出现一个超链接数字(有的渲染为上标格式),点击数字跳转到文末 glossary 区域该脚注的定义处。文末 glossary 区域该脚注定义的行尾会添加一个回车符号(↵),点击可回到被标注的脚注点。

    测试 Hexo3.0 有些主题不支持footnote, 可以参考<http://nsfw.hjwu.me/2014-07-07/hexo-plugin-for-parse-footnotes/>
  10. 嵌入代码

    单行的时候用 `asdf`
    多行的时候用

    ```
    aaaaaa
    ```

    比如

    1
    Here's an idea: why don't we take `SuperiorProject` and turn it into `**Reasonable**Project`.

    Here’s an idea: why don’t we take SuperiorProject and turn it into **Reasonable**Project.

    嵌入代码里面用反引号怎么办? 参考这里

    1
    2
    3
    4
    5
    6
    7
    A single backtick in a code span: `` ` ``

    A backtick-delimited string in a code span: `` `foo` ``

    `&#8212;` is the decimal-encoded equivalent of `&mdash;`.

    ``git archive master --format=zip > `git describe master`.zip``

    会得到:
    A single backtick in a code span: `
    A backtick-delimited string in a code span: `foo`
    &#8212; is the decimal-encoded equivalent of &mdash;.
    git archive master --format=zip > `git describe master`.zip

    标准 Markdown 不支持脚标, 只能通过内嵌 HTML 的<sup><sub>标签来实现
    比如 H<sub>2</sub>O 将生成 H2O

    可以直接在反引号里面写html代码

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <table>
    <tr>
    <th rowspan="2">值班人员</th>
    <th>星期一</th>
    <th>星期二</th>
    <th>星期三</th>
    </tr>
    <tr>
    <td>李强</td>
    <td>张明</td>
    <td>王平</td>
    </tr>
    </table>
  11. 表格

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    |产品|价格|
    |---|--:|
    |Leanote 高级账号|60元/年|
    |Leanote 超级账号|120元/年 `print("Format with CodeRay")`|

    |学号|姓名|分数|
    |------|-----|---------|
    |小明|男|75|
    |小红|女|79|
    |小陆|男|92|
  12. 分割线

    1
    2
    3
    4
    5
    * * *
    ***
    *****
    - - -
    ---------------------------------------
  13. LaTex公式

    • $ 表示行内公式:

      1
      质能守恒方程可以用一个很简洁的方程式 $E=mc^2$ 来表达。

      质能守恒方程可以用一个很简洁的方程式 $E=mc^2$ 来表达。

    • $$ 表示整行公式:每个公式要隔一行

      1
      2
      3
      $$\sum_{i=1}^n a_i=0$$
      $$f(x_1,x_x,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 $$
      $$\sum^{j-1}_{k=0}{\widehat{\gamma}_{kj} z_k}$$ #测试不成功

      $$\sum_{i=1}^n a_i=0$$

      $$f(x_1,x_x,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 $$

      $$ {\gamma} $$

  14. 流程图 更多

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    flow
    st=>start: Start:>https://www.zybuluo.com
    io=>inputoutput: verification
    op=>operation: Your Operation
    cond=>condition: Yes or No?
    sub=>subroutine: Your Subroutine
    e=>end
    st->io->op->cond
    cond(yes)->e
    cond(no)->sub->io
  15. 序列图

  16. 其他

    [TOC]
    [图标](http://fortawesome.github.io/Font-Awesome/3.2.1/icons/ "http://fortawesome.github.io/Font-Awesome/3.2.1/icons/")
    

The end!

参考
Markdown-语法手册
Mastering Markdown
Markdown详解
Hexo
Hexo进阶


  1. Footnote_Text
文章目录
  1. 1. 编辑器
  2. 2. 常用语法速查