Markdown

Typora

Markdown基本语法介绍

文章目录

  • Typora
    • Markdown基本语法介绍
      • 1、段落 Headers
  • This is an H1
    • This is an H2
            • This is an H6
      • 2、块引用 Blockquotes
    • This is Headers
      • 3、无序列表和有序列表 Lists
      • 4、备忘录 Task List
      • 5、代码块 Code Blocks
      • 6、数学块 Math Blocks
      • 7、表 Tables
      • 8、注脚 Foot Note
      • 9、水平线 Horizontal Rules
      • 10、YAML Front Matter
      • 11、目录 Table of Contents(TOC)
      • 12、超链接 Link
        • inline link
        • reference link
      • 13、超链接 URLs
      • 14、图片 Image
      • 15、强调 Emphasis
      • 16、粗体 Strong
      • 17、代码 Code
      • 18、删除线 Strikethrough
      • 19、Emoji表情 :happy:
      • 20、Inline Math
      • 21、下标 Subscript
      • 22、上标 Superscript
      • 23、高亮 Highlight
      • 24、HTML
      • 25、Underlines
      • 26、Embed Contents
      • 27、Video
      • 28、Other HTML Support

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.

文章目录

  • Typora
    • Markdown基本语法介绍
      • 1、段落 Headers
  • This is an H1
    • This is an H2
            • This is an H6
      • 2、块引用 Blockquotes
    • This is Headers
      • 3、无序列表和有序列表 Lists
      • 4、备忘录 Task List
      • 5、代码块 Code Blocks
      • 6、数学块 Math Blocks
      • 7、表 Tables
      • 8、注脚 Foot Note
      • 9、水平线 Horizontal Rules
      • 10、YAML Front Matter
      • 11、目录 Table of Contents(TOC)
      • 12、超链接 Link
        • inline link
        • reference link
      • 13、超链接 URLs
      • 14、图片 Image
      • 15、强调 Emphasis
      • 16、粗体 Strong
      • 17、代码 Code
      • 18、删除线 Strikethrough
      • 19、Emoji表情 :happy:
      • 20、Inline Math
      • 21、下标 Subscript
      • 22、上标 Superscript
      • 23、高亮 Highlight
      • 24、HTML
      • 25、Underlines
      • 26、Embed Contents
      • 27、Video
      • 28、Other HTML Support

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 [email protected].

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 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 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:


27、Video

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

28、Other HTML Support

You can find more details here.


  1. Here is the first footnote ↩︎

你可能感兴趣的:(工具)