The experience of using Markdown

       Markdown is a lightweight markup language that allows people to write documents in a plain text format that is easy to read and write, which is then converted into richly formatted HTML pages . Before using editors such as Markdown, when word documents need to be published, it is always necessary to consider publishing through doc or pdf, or other mainstream mht. But no matter how to publish, you still need a rich text editor such as word, and then various conversion tools such as doctopdf, pdftodoc, etc., which is relatively cumbersome and wastes time and resources. And markdown editor can overcome all these shortcomings. At the same time, Markdown is powerful, with the advantages of focused content, convenient format conversion, and good compatibility. The most important thing is that it is easy to learn, write and understand. The goal of Markdown syntax is to be a writing language suitable for the web. Markdown isn't meant to replace HTML , or even come close to it, it has very few types of syntax and corresponds to only a small subset of HTML markup. The idea of ​​Markdown is to make documents easier to read, write, and change at will. HTML is a publishing format, Markdown is a writing format. Therefore, Markdown's formatting syntax only covers what plain text can.

       Paragraphs and line breaks in Markdown: A Markdown paragraph is composed of one or more consecutive lines of text, and there must be more than one blank line before and after it (the definition of a blank line is that it appears to be empty on the display, it will be Treated as a blank line. For example, if a line contains only spaces and tabs, it will also be treated as a blank line). Normal paragraphs should not be indented with spaces or tabs. The phrase "consists of one or more consecutive lines of text" actually implies that Markdown allows forced line breaks (insertion of newlines) within paragraphs, a feature that is different from most other text-to-HTML formats (including Movable Type "Convert Line Breaks" option), other formats will convert each line break into a <br/> tag. If you really want to rely on Markdown to insert <br /> tags, press two or more spaces before inserting and then enter. It's true that it takes a little more work (additional spaces) to generate <br />  , but the simple "convert every newline to <br />" method is not suitable in Markdown, email-style  block quotes in Markdown  and multi-paragraph  lists  are not only easier to use, but also easier to read when using newlines to typesetting. Headings in Markdown: Markdown supports two syntaxes for headings. Class  Settext  and class  atx  form. The class Setext form is the form with the bottom line, using = (Highest-order heading) and  (second-order heading) , the Atx-like form inserts 1 to 6 at the beginning of the line  , corresponding to headings 1 to 6. Blockquotes in Markdown Blockquotes: Markdown markup blockquotes use a quoting method similar to that used  in email. If you're familiar with quotes in email letters, you know how to create a block quote in a Markdown file. It would look like you break the line yourself, then add   , Markdown at the top of each line. It also allows you to be lazy and only add at the beginning of the first line of the entire paragraph   ,- # > >>Block references can be nested (eg: references within references), as long as different numbers are added according to the level  > , other Markdown syntaxes can also be used in the referenced blocks, including headings, lists, code blocks, etc. Lists in Markdown: Markdown supports ordered lists and unordered lists. Unordered lists use asterisks, plus signs or minus signs as list markers. It is important to note that the numbers used on the list tags do not affect the output HTML. Code modules in Markdown: Program-related writing or tag language source codes usually have code blocks that have already been typeset. Usually, we don’t want these blocks to be typeset in the way of general paragraph files, but the original code. , Markdown will   wrap code blocks with <pre> and  tags. <code>Building blocks of code in Markdown is as simple as indenting them by 4 spaces or 1 tab. Links in Markdown : Markdown supports two forms of link syntax:  inline and reference . Either way, link text is marked with [ square brackets]. To create an inline link, just follow the square brackets followed by parentheses and insert the URL link. If you also want to add the title text of the link, just wrap the title text in double quotes after the URL. Can.

      After a few days of study, I not only have a better understanding of the Markdown editor, but also master some of its basic usage. Such as font settings: when adding "#" before a word, sentence, or paragraph, the font size can be changed. Such as quoting: only need to add ">" before the quoted content. As well as formatting for displaying code, images and links, styling for tables, and some accessibility features to make articles more beautiful.

    


       Although I have only learned some relatively basic usage and applications of the Markdown editor in the past few days, I have deeply realized the advantages of Markdown being easy to learn, write and understand. At the same time, it is also full of expectations for further in-depth study and application of this editor to complete document writing.




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325565358&siteId=291194637