Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the Markdown syntax?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly talks about "what is the grammar of Markdown". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what are the Markdown grammars?"

Catalogue

Code:

[TOC] [MENU]

The effect is shown above

Multi-level title

Code:

# first-level title # # second-level title # Multi-level title

Effect.

First-level title and second-level title

Multi-level title

References and comments

Code:

> first-level reference > second-level reference > n-level reference

Effect.

First level citation

Secondary reference

N-level reference

Insert code within the line of code

Code:

`inline code`

Effect inline code

Code segment

This is code / / code that ignores markdown syntax, so all the parts in this article that show the original text of markdown are wrapped in code snippets.

Code:

This is the code ````javascriptvar s = "JavaScript syntax highlighting"; alert (s); `pythons = "Python syntax highlighting" print s`makrdown > first-level reference > second-level reference > n-level reference > n-level reference ``multilevel list unordered list

Code:

/ /-* + three symbols have equal status in the unordered list-item 1 * item 2 * item 2 / / preceded by a space or tab indicates the next level * this is the first level + the third item

Effect.

Subparagraph 1

Subparagraph 2

This is level one again.

The second item / / preceded by a space or tab indicates the next level

Subparagraph 3

Ordered list

Code:

/ / the figures are added. Adding a space indicates an ordered list item, and tab or space triggers the next level 1. 0. This is in order. This is orderly 2. This is in order. It's orderly.

It's orderly.

It's orderly.

It's orderly.

It's orderly.

Hyperlink in-line hyperlink

Code:

[Baidu] (baidu.com)

Effect.

Baidu

Parametric hyperlink

Code:

Disclaimer: [Baidu]: baidu.com use: enter [Baidu] font

Code:

* italic * bold * italic bold * * ~ delete line ~ ~

Effect.

Italic

Bold type

Italic bold

Delete Lin

Form

Code:

| | Tables | Are | Cool | |-|:: |-| col 3 is | right-aligned | $1600 | | col 2 is | centered | $12 | | zebra stripes | are neat | $1 | Note: -: right alignment:-left alignment: -: Center alignment |

Effect.

TablesAreCoolcol 3 isright-aligned$1600col 2 iscentered$12zebra stripesare neat$1 Picture

Code:

! [picture] (image address) / / Note: the default image format is the original size. If you want to customize the image size, To use the img tag: Inline-style:! [alt text] (https://gitee.com/msntec/work-notes/raw/master/Markdown/pic/markdown_flag.png "Logo Title Text 1") Reference-style:! [alt text] [logo] [logo]: https://gitee.com/msntec/work-notes/raw/master/Markdown/pic/markdown_flag.png "Logo Title Text 2"

Inline-style:

Reference-style:

Set picture size Markdown has its own function

Code:

! [loading.png] (https://upload-images.jianshu.io/upload_images/6967706-0b0037793a690aeb.png?imageMogr2/auto-orient/strip|imageView2/2/w/512/format/webp?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)![loading.png](https://upload-images.jianshu.io/upload_images/6967706-0b0037793a690aeb.png?imageMogr2/auto-orient/strip|imageView2/2/w/512/format/webp?imageMogr2/auto-orient/strip%7CimageView2/2/w/200)

Effect display

Use HTML

Label and set width and height and scale

Code:

图片替换文本

图片替换文本

Effect display

图片替换文本

图片替换文本

Multiple marquee

Code:

-[x] A-[] B-[x] selected-[] not selected-[] supports exporting documents in PDF format-[] improved Cmd rendering algorithm, improved rendering efficiency using local rendering technology-[x] added Todo list function-[x] fixed LaTex formula rendering problem-[x] added LaTex formula numbering function

Effect display

[x] A

[] B

[X] selected

[] not selected

[] support exporting manuscripts in PDF format

[] improve Cmd rendering algorithm and use local rendering technology to improve rendering efficiency

[X] add Todo list function

[X] fixed LaTex formula rendering problem

[X] add LaTex formula numbering function

Footnote (footnote)

Code:

Somewhere in the body of the article [^ footnote id] the text of the article [^ footnote id]: footnote content

Effect display

Somewhere in the body of the article footnote id the text of the article

Flow chart

Code:

````flowst= > start: Start: > https://amwiki.xf09.net[blank]e=>end: End: > https://amwiki.xf09.net[blank]op1=>operation: My Operationop2= > operation: Stuffsub1= > subroutine: My Subroutinecond= > condition: Yes or No?: > https://amwiki.xf09.net[blank]c2=>condition: Good ideaio= > inputoutput: catch something...st- > op1 (right)-> condcond (yes, right)-> c2cond (no)-> sub1 (left)-> op1c2 (yes)-> io- > ec2 (no)-> op2- > e````

Effect display

Introduction to flow chart syntax

The flowchart syntax is divided into two parts, one is to declare elements, and the other is to define the process.

Declaration element

Syntax:

Tag= > type: content: > url

Tag set element name

= > element definer

Type: sets the element type, which is divided into 6 types:

Start: start, rounded rectangle

End: end, rounded rectangle

Operation: operation / Action Plan, normal rectangle

Subroutine: sub-theme / module, double-sided rectangle

Condition: condition judgment / problem audit, diamond

Inputoutput: input / output, parallelogram

Content setting elements display content, both Chinese and English

: > url setting element connection. Optional, followed by [blank] to create a new window and open it.

Note: note that spaces cannot be followed by spaces before and after = >; type: spaces must be followed by spaces;: > is a syntax tag with no spaces in the middle.

Define the process

Syntax:

Tag1 (branch,direction)-> tag2

-> process definer, connecting two elements

Branch sets two branches of the condition type element, with two values of yes/no, and the other elements are invalid

Direction defines the alignment direction of the process. There are four values of left/right/top/bottom, and all elements are valid. This configuration is optional (PS: this attribute has a certain chance of triggering graphic dislocation, and you can refresh it).

Tips:

Continue to pay attention to spaces, no spaces before and after->

Because the condition type has two branches, we usually wrap when we encounter a condition element, such as:

St- > op1-c2 c2 (yes)-> io- > Ec2 (no)-> op2- > e

Due to the limited Markdow support of the OSCHINA community, some commands cannot be displayed here. I use typora to edit markdown documents, this markdown tool is free. My README.md and the generated pdf document how_to_use_markdown.pdf are attached here.

At this point, I believe you have a deeper understanding of "what is the Markdown grammar?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report