Markdown Learning

来源:互联网 发布:linux 查看目录被使用 编辑:程序博客网 时间:2024/06/04 18:53

Markdown Learning

syntax

idea

The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose.

  • 优化了对于> &的处理(翻译成机器语言)
  • which translate every line break character in a paragraph into a <br /> tag.

目录构建

  • [目录显示名](#id)
  • 在被引用区域要写<h1 id="123"> 内容 </h1>
  • 外引用使用链接,有趣的是某个网站的子链接可以省略一些东西

标题 引用块 强调 列表
链接 图片 代码块 Mou

标题

hehe

haha

  • 一级标题,在文字下面加===,二级则是—.(Setext-style headers)
  • 也就是说不是标题的===,—就要空行来区分.
  • 当然也可以用多个# 或者< h1>来表示.(Atx-style headers)

    • <h1>类似,#后面也可以加#表示结束

    return top






Blockquotes

呵呵

This is an H2 in a blockquote

  • 用 > 加空格表示引用, > 后可以加上#加粗= =
  • 当当然也可以用< blockquote>表示 #就是在里面用< h2>
  • 普通段落< p>,当然不标记也无妨
  • Blockquotes can be nested (i.e. a blockquote-in-a-blockquote)
    by adding additional levels of >:

    This is the first level of quoting.

    This is nested blockquote.

    Back to the first level.

return top






强调

123
456

123
456

123
456

  • 用 ‘*’或 ‘_’ 表示强调 上面分别是1~3对
  • 也就是< em>或者< strong>

    其实我觉得这样也算强调啊
    • 2*tab(代码块)

return top






LISTS

  • 1
  • 2
  • 3

  • 1
  • 2
  • 3

  • 1
  • 2
  • 3

  • Candy.
  • Gum.
  • Booze.

  • 可以用’+’,’-‘,’*’表示lists,但是Mou对于’*’的支持更好
  • 不同的lists之间可以用—来分开..不然排版会很奇怪
    • —要和前一个list之间有换行
    • 其实最好每个list后面都有一个换行
  • 最后一种是用< ul>来划定list块,然后每一行用< li>来定义行
    • 在提示符前面加一个tab便可以实现子列表

ordered

  1. 1
  2. 2
    • 就是这样写
    • 但是在”1.”,”2.”之后再加*便是会跟着ordered
    • 同理,在”*”下面的1,2,3便是普通的了
      • 二级列表再一次自成体系
        • hhh还有三级列表
    • 有趣的是,如果你的顺序反了,它是不会理你的顺序的
    • 代码块就是把list的< ul>换成< ol>

return top







Links

===

inline

google

  • 可以用<url>来表示一个地址
  • [表示内容](地址/ “提示内容” )
  • <a href="http://google.com/" title="test google">google </a>(在最后写内容)

reference

I get 10 times more traffic from Google than from
Yahoo or MSN.

  • 在原文中[内容][序号] 如[Google][1]
  • 在原文下面[序号]: 地址 “Title” (此处Title可以省略)
  • 没有序号的话可以为空,但是下面序号位置得用[内容]
    • not case sensitive
  • The link URL may, optionally, be surrounded by angle brackets:

    [id]: http://example.com/ “Optional Title Here”

The following three link definitions are equivalent:

[foo]: http://example.com/  "Optional Title Here"[foo]: http://example.com/  'Optional Title Here'[foo]: http://example.com/  (Optional Title Here)

return top






Images

Inline

(titles are optional):

  • ![alt text](/path/to/img.jpg “Title”)

Reference-style:

  • ![alt text][id]
  • [id]: /path/to/img.jpg “Title”

ori

<img src="/path/to/img.jpg" alt="alt text" title="Title" />

return top






code

===
* 分别用1,2,3对 ` 的效果(在一行内用三个效果和1,2个一样)
* tab就行= =


123


123

123
  • 可以用`来消除<内容>和 (—) &mdash; &#8212; 的效果
  • <code>\&amp;mdash;</code>
  • Markdown wraps a code blockin both <pre> and <code> tags.
  • To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:

<blink>

return top

Others

  1. <a /> 会让接下来一行字变蓝= = /前面可以加id=”…”
    • 除了可以画下划线,*也可以(在下划线前面加*并不能让列表保持)
    • 等价于<hr />
    • 用一个换行区分代码块
    • <span> 123
    • <del> 123
    • double ~ 1
    • <cite> 123

Mou

Tables

A simple table looks like this:

First Header Second Header Third Header Content Cell Content Cell Content Cell Content Cell Content Cell Content Cell
First Header | Second Header | Third Header------------ | ------------- | ------------Content Cell | Content Cell  | Content CellContent Cell | Content Cell  | Content Cell

Specify alignment for each column by adding colons to separator lines:

First Header Second Header Third Header Left Center Right Left Center Right
    First Header | Second Header | Third Header    :----------- | :-----------: | -----------:    Left         | Center        | Right    Left         | Center        | Right

Shortcuts

View

  • Toggle live preview: Shift + Cmd + I
  • Toggle Words Counter: Shift + Cmd + W
  • Toggle Transparent: Shift + Cmd + T
  • Toggle Floating: Shift + Cmd + F
  • Left/Right = 1/1: Cmd + 0
  • Left/Right = 3/1: Cmd + +
  • Left/Right = 1/3: Cmd + -
  • Toggle Writing orientation: Cmd + L
  • Toggle fullscreen: Control + Cmd + F

Edit

  • Auto complete current word: Esc
  • Find: Cmd + F
  • Close find bar: Esc

Export

  • Export HTML: Option + Cmd + E
  • Export PDF: Option + Cmd + P

Actions

  • Copy HTML: Option + Cmd + C
  • Strong: Select text, Cmd + B
  • Emphasize: Select text, Cmd + I
  • Inline Code: Select text, Cmd + K
  • Strikethrough: Select text, Cmd + U
  • Link: Select text, Control + Shift + L
  • Image: Select text, Control + Shift + I
  • Select Word: Control + Option + W
  • Select Line: Shift + Cmd + L
  • Select All: Cmd + A
  • Deselect All: Cmd + D
  • Convert to Uppercase: Select text, Control + U
  • Convert to Lowercase: Select text, Control + Shift + U
  • Convert to Titlecase: Select text, Control + Option + U
  • Convert to List: Select lines, Control + L
  • Convert to Blockquote: Select lines, Control + Q
  • Convert to H1: Cmd + 1
  • Convert to H2: Cmd + 2
  • Convert to H3: Cmd + 3
  • Convert to H4: Cmd + 4
  • Convert to H5: Cmd + 5
  • Convert to H6: Cmd + 6
  • Convert Spaces to Tabs: Control + [
  • Convert Tabs to Spaces: Control + ]
  • Insert Current Date: Control + Shift + 1
  • Insert Current Time: Control + Shift + 2
  • Insert entity <: Control + Shift + ,
  • Insert entity >: Control + Shift + .
  • Insert entity &: Control + Shift + 7
  • Insert entity Space: Control + Shift + Space
  • Insert Scriptogr.am Header: Control + Shift + G
  • Shift Line Left: Select lines, Cmd + [
  • Shift Line Right: Select lines, Cmd + ]
  • New Line: Cmd + Return
  • Comment: Cmd + /
  • Hard Linebreak: Control + Return

Backslash Escapes

Markdown provides backslash escapes for the following characters:

\   backslash`   backtick*   asterisk_   underscore{}  curly braces[]  square brackets()  parentheses#   hash mark+   plus sign-   minus sign (hyphen).   dot!   exclamation mark

Actions

  • Copy HTML: Option + Cmd + C
  • Strong: Select text, Cmd + B
  • Emphasize: Select text, Cmd + I
  • Inline Code: Select text, Cmd + K
  • Strikethrough: Select text, Cmd + U
  • Link: Select text, Control + Shift + L
  • Image: Select text, Control + Shift + I
  • Select Word: Control + Option + W
  • Select Line: Shift + Cmd + L
  • Select All: Cmd + A
  • Deselect All: Cmd + D
  • Convert to Uppercase: Select text, Control + U
  • Convert to Lowercase: Select text, Control + Shift + U
  • Convert to Titlecase: Select text, Control + Option + U
  • Convert to List: Select lines, Control + L
  • Convert to Blockquote: Select lines, Control + Q
  • Convert to H1: Cmd + 1
  • Convert to H2: Cmd + 2
  • Convert to H3: Cmd + 3
  • Convert to H4: Cmd + 4
  • Convert to H5: Cmd + 5
  • Convert to H6: Cmd + 6
  • Convert Spaces to Tabs: Control + [
  • Convert Tabs to Spaces: Control + ]
  • Insert Current Date: Control + Shift + 1
  • Insert Current Time: Control + Shift + 2
  • Insert entity <: Control + Shift + ,
  • Insert entity >: Control + Shift + .
  • Insert entity &: Control + Shift + 7
  • Insert entity Space: Control + Shift + Space
  • Insert Scriptogr.am Header: Control + Shift + G
  • Shift Line Left: Select lines, Cmd + [
  • Shift Line Right: Select lines, Cmd + ]
  • New Line: Cmd + Return
  • Comment: Cmd + /
  • Hard Linebreak: Control + Return

Backslash Escapes

Markdown provides backslash escapes for the following characters:

\   backslash`   backtick*   asterisk_   underscore{}  curly braces[]  square brackets()  parentheses#   hash mark+   plus sign-   minus sign (hyphen).   dot!   exclamation mark

BTW
csdn的markdown编辑器不支持部分转义符

1 0
原创粉丝点击