Markdown

Typora

Markdown基本语法介绍

1、段落 Headers

Headers use 1-6 hash (#)+space characters at the start of the line, corresponding to header levels 1-6. For example:

This is an H1

This is an H2

This is an H6
# This is an H1

## This is an H2

###### This is an H6

Or type ctrl+1 to ctrl+6as a shortcut.

2、块引用 Blockquotes

Markdown uses email-style > characters for block quoting.

You can using markdown in Blockquotes

This is Headers

> This is a blockquote with two paragraphs. This is first paragraph.

可以镶嵌使用块引用 Eg:

The first block

The second block

3、无序列表和有序列表 Lists

无序列表 Typing *+space list item 1 will create an unordered list. (The * symbol can be replace with + or -.)

有序列表 Typing 1. list item 1 will create an ordered list.

For example:

using “*” create unordered list

  • item1

  • item2

    or using “+”

    • item1

    • item 2

      or using “-”

      • item1
      • item2

using 1. create ordered list

  1. item1
  2. item2
  3. item3

4、备忘录 Task List

Task lists are lists with items marked as either [ ] or [x] (incomplete or complete). For example:

using - [ ] to mark incomplete task lists (注意在[ ] 前后都要有空格

  • a task list item

  • list syntax required

  • normal formatting , @mentions, #1234 refs

  • incomplete

    using - [x] to mark incomplete task lists (注意在[ ] 前后都要有空格)

  • completed

    You can change the complete/incomplete state by clicking on the checkbox before the item.

5、代码块 Code Blocks

Using fences is easy: type `````and press `enter`. Add an optional language identifier after `````and Typora runs it through syntax highlighting:

这里用两个反引号包裹 以达到输出反引号的效果;注意添加空格包裹

Here's an example:

```
function test() {
console.log("notice the blank line before this function?");
}
```

syntax highlighting:
会为特定的语法进行语法高亮
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
function test() {
console.log("notice the blank line before this function?");
}
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

6、数学块 Math Blocks

You can render LaTeX mathematical expressions using MathJax

You can find more details here.

7、表 Tables

Enter | First Header | Second Header | and press the enter key. This will create a table with two columns.

After a table is created, placing the focus on that table will open up a toolbar for the table where you can resize, align, or delete the table. You can also use the context menu to copy and add/delete individual columns/rows.

第一列第二列

8、注脚 Foot Note

You can create footnotes like this[^1]

footnote1:Here is footnote ;

9、水平线 Horizontal Rules

Entering *** or --- on a blank line and pressing enter will draw a horizontal rules.



10、YAML Front Matter

11、目录 Table of Contents(TOC)

enter [toc] and press to create a “Table of Contents” section.

12、超链接 Link

Markdown supports two styles of links: inline and reference.

In both styles, the link text is delimited by[square brackets](url)

inline link

Bing

reference link
I get 10 times more traffic from [Google][1] than from [Yahoo][2] or [MSN][3].  

[1]: http://google.com/        "Google" 
[2]: http://search.yahoo.com/  "Yahoo Search" 
[3]: http://search.msn.com/    "MSN Search"

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

In Typora, clicking the link will expand it for editing, and ctrl+click will open the hyperlink in your web browser.

13、超链接 URLs

Typora allows you to insert URLs as links, wrapped by <brackets>. For example `` becomes i@typora.io.

Typora will also automatically link standard URLs (for example: www.google.com) without these brackets.

14、图片 Image

Images have similar syntax as links, but they require an additional ! char before the start of the link. The syntax for inserting an image looks like this:

![Alt text](/path/to/img.jpg)

![Alt text](/path/to/img.jpg "Optional title")

You are able to use drag and drop to insert an image from an image file or your web browser. You can modify the markdown source code by clicking on the image.

15、强调 Emphasis

Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML `` tag. For example:

*emphasis text*
_emphasis text_

this is another emphasis

this is emphasis

GFM will ignore underscores in words, which is commonly used in code and names, like this:

wow_great_stuff

do_this_and_do_that_and_another_thing.

do_this_and_do

using backslash character to print * and _

16、粗体 Strong

A double * or _ will cause its enclosed contents to be wrapped with an HTML `` tag.

strong

Strong

Typora recommends using the ** symbol

17、代码 Code

To indicate an inline span of code, wrap it with backtick quotes `

print()

18、删除线 Strikethrough

GFM adds syntax to create strikethrough text, which is missing from standard Markdown. Using ~~ create strikethrough.

mistake text

19、Emoji表情 :happy:

Enter emoji with syntax :smile:. To make it easier, an auto-complete helper will pop up after typing : and the start of an emoji name.

Entering UTF-8 emoji characters directly is also supported by going to Edit -> Emoji & Symbols in the menu bar.

20、Inline Math

You can find more details here.

21、下标 Subscript

To use this feature, please enable it first in the Markdown tab of the preference panel. Then, use ~ to wrap subscript content. For example: H~2~O, X~long\ text~/(Before using Subscript in Typora you need to set syntax to support Subscript file> preferences> syntax support check superscript and subscript )

Xi

or using <sub> </sub> wrap subscript content.

H20 Xi

22、上标 Superscript

To use this feature, please enable it first in the Markdown tab of the preference panel. Then, use ^ to wrap superscript content. For example: X^2^

X2

or using <sup> </sup> wrap superscript content.

GoogleTM X2

23、高亮 Highlight

To use this feature, please enable it first in the Markdown tab of the preference panel. Then, use == to wrap highlight content. For example: ==highlight==(Before using Highlight in Typora you need to set syntax to support Highlight file> preferences> syntax support check Highlight )

Highlight

24、HTML

You can use HTML to style content what pure Markdown does not support. For example, use this text is red to add text with red color

25、Underlines

Underline isn’t specified in Markdown of GFM, but can be produced by using underline HTML tags:

Underline becomes Underline.

26、Embed Contents

Some websites provide iframe-based embed code which you can also paste into Typora. For example:

<iframe height='265' scrolling='no' title='Fancy Animated SVG Menu' src='http://codepen.io/jeangontijo/embed/OxVywj/?height=265&theme-id=0&default-tab=css,result&embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'></iframe>

27、Video

You can use the `` HTML tag to embed videos. For example:

<video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" />

28、Other HTML Support

You can find more details here.


  1. Here is the first footnote ↩︎

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值