Edit the text of a sharp weapon--markdown

Source: Internet
Author: User
Tags hosting sites

Reproduced in a master, the original link http://www.cnblogs.com/elecsun/p/5741287.html

What is Markdown ? This is how it is presented on Wikipedia:

Markdown is a lightweight markup language, the founder of John Grouber (John Gruber). It allows people to "write documents in plain text format that is easy to read and write, and then convert them into valid XHTML (or HTML) documents."

Although Wikipedia's definition is clear, it is difficult for non-programmer friends to understand the introduction. In fact, do not understand is very normal, interlacing as Foster, but the reason to introduce Markdown, is because it is very simple and practical, can greatly improve the efficiency of text editing, for non-programmers, it is also worth learning to use. Now, let me try to get you started.

What Markdow can use to do

We are now in the internet age, which means that all kinds of descriptive documents, blog posts, product brochures, text news and other textual information, are viewed from the Web page. Some people say, now mobile phone app is very rich, usually look at the headlines, know daily, the public number and so on is not on the page. In fact, these things are also presented on the Web page, but the app to the browser added a beautiful shell, so that you do not feel. So in today's era, the Web page instead of paper, became the carrier of all kinds of documents. The documents you write, the copy, and even the diary, are presented from the Web page, not printed on paper for people to view. Since there are so many documents online, there are naturally many content providers who publish these documents. These people have a professional writing editor, there are network writers, there is a love Bubble forum network worms, of course, there are a large number of programmers. If you need to post text on the web often, Markdown can help you a lot.

Whether the paper or the Web page, the presentation of the document must be well-organized, beautiful to make people have the desire to read. A beautiful article can make people happy, but if typesetting a mess, I think it has no chance to be read. In the paper age, people use Word, WPS and other text editing tools for typesetting, and then print to the paper for people to read. In the era of Web pages, the layout of documents has its own tools and methods. In a nutshell, a Web page is actually a text file, and we can think of it as a Word document that records the contents of the document and the typographic markup. and the browser is equivalent to a printer, it will parse the page file in the layout tag, according to the rules of the document "print" to the screen for people to read.

But, this typesetting rules too complex, don't say is ordinary people, is specialized in web development programmer, also can not smooth directly write a well-typeset Web document, so Markdown was invented. In short, markdown is a translator, you do a few simple tags when writing documents, similar to *,>, #等等, they represent a different layout style, Markdown will translate these tags into the browser can recognize the typesetting rules. In this way, we do not need to understand the complex layout rules of the browser, only need to remember a few simple tags, you can be able to present on the page layout of the beautiful document.

Is it necessary to use markdown?

The first thing I want to say is that learning Markdown is so easy that it takes less than half an hour to learn most of the functions that are needed for everyday life. If you often need to work on writing, whether your text ends up on the web or on paper, I recommend that you use Markdown. because, markdown can not interrupt your writing ideas, so that you can almost simultaneously complete the text input and typesetting work . This is amazing, isn't it?

Recall your experience with Word, if you want to write 2000 or so of the document, even the simplest layout, you have to interrupt the idea several times during writing, choose font size, bold, align, set paragraph spacing and line spacing, and so on. And you have to use the mouse to do this-this will leave your hands out of the keyboard core operation area. These two points are intolerable for those who need to write often.

Unbearable is definitely not an exaggeration to say, because if you are writing a logically rigorous text, every interruption of thinking, and then back to continue the last thought, at least half a minute, if it happens that the state of the day is not good, even need more than 5 minutes. If it is unfortunate that you have serious procrastination ... It may not come back for another one or two hours.

Although writing an article is mental, but typing the keyboard to enter the text into the computer's action is still a "physical life." When your hands are flying on the keyboard, you definitely don't want to stop and move the mouse, because it also interrupts your muscle movement.

Well, now that we know Markdown's core strengths--markdown can make typography without interrupting writing ideas, while liberating your mouse, greatly improving writing efficiency .

Markdown Demo

If you enter the following in the Markdown editor:

#Markdown的简单演示(一级标题)##1 强调演示(二级标题)###1.1 加粗(三级标题)**这段文字被加粗了**###1.2 斜体*这段文字变斜体了*##2 列表演示###2.1 有序列表  有序列表只需输入数字+点符号+空格即可:1. 有序列表1  2. 有序列表2  3. 有序列表3  ###2.2 无序列表无序列表可以用使用星号、加号或是减号(任选其一)+空格即可:  * 无序列表1  + 无序列表1  - 无序列表1  ##3 区块###3.1 引用>这段话是引用李白《侠客行》中的几句诗:  >银鞍照白马,飒沓如流星。十步杀一人,千里不留行。事了拂衣去,深藏身与名。###3.2 代码段程序员会经常用到这个功能。只需要在录入代码时,在行首加入一个Tab或者4个空格即可      printf("Hello,world!");##4 分隔线在一行中用三个以上的星号、减号、下划线来建立一个分隔线:***---___##5 超链接这是我的[个人博客](www.sunxin.me)。  以上只是Markdown最核心部分的语法简介,想了解更多,请戳[这里](http://www.jianshu.com/p/1e402922ee32/)

Note that the above text, except for spaces, carriage returns, and some slightly strange characters, has nothing to spare, this is called plain text, and you can do the above input in any editor. However, by giving the above text to the Markdown editor, the following effect will be produced:

A simple demonstration of markdown (level headings) 1 Highlights presentation (Level two title) 1.1 bold (three-level title)

This text has been bold.

1.2 Italic

This text has become italic.

2 List Demo 2.1 ordered list

The sequence list only needs to enter a number + dot symbol + space:

    1. With Sequence list 1
    2. With Sequence List 2
    3. With Sequence list 3

      2.2 Unordered List

      Unordered lists can be used with asterisks, plus or minus (either) + spaces:

    • No sequence table 1
    • No sequence table 1
    • No sequence table 1

      3 Block 3.1 references

      This passage refers to a few verses from Li Bai's "Knight's Line":
      The silver Saddle shines the White horse, the sa stacks like a meteor. Ten steps to kill a person, thousands of miles do not leave a line. Thing to brush the clothes to go, deep hiding with the name.

      3.2 Code Snippets

      This feature is often used by programmers. You only need to add a tab or 4 spaces at the beginning of the line to enter the code.

      printf ("hello,world!");

      4 Dividing line

      Create a divider line with more than three asterisks, minus signs, and underscores in one line:
      ***
      ---
      ___

      Markdown's application Scenario

Since my number has not yet been applied to the original, I cannot add a hyperlink, so the demo of the hyperlink you can't see, I cut a picture of the demo effect

You've seen the markdown's convenience and strength. So what is the usual occasion to use markdown? In fact, my male articles are all done using markdown. In addition to the public number, you can also use Markdown to write blog, forum long posts, even e-mail. If you are a programmer, you can use Markdown to write documents, and now the major code hosting sites support Markdown writing.

If you are an online writer, journalist and other writing workers, with markdown write through the original content of elegant typesetting, and then to the editor, can make the editor of the wrong, adjust the structure of the article more easily.

Markdown learning curve is very gentle, easy to use, adhere to a few days can be skilled use. Today we have learned what is markdown and the basic syntax of markdown. But before you formally start using markdown, there is a little distance, and the next article will let you really get into the markdown world.

Edit the text of a sharp weapon--markdown

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.