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

How to customize typesetting articles in markdown

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article is to share with you about how to customize the typesetting article in markdown, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Why choose Markdown?

It is based on plain text, simple syntax and easy to modify and share.

Can be written in almost any text editor

Easy to convert to HTML documents or other formats

Suitable for writing documents, taking notes and writing articles

The point is, you don't have to worry about typesetting anymore.

What Markdown grammars are used when writing articles

Title. In my writing, I mainly use the headlines # # H2 # and # H3 #, which is enough for most people.

Paragraph. As long as you are writing, there must be blank lines before and after the text, so that paragraphs will be generated naturally.

Quote. Using the > symbol before a paragraph or content, you can mark the content as "reference"

List. Unordered and ordered lists. Unordered list items begin with:-(symbolic spaces) ordered list items begin with numbers. Space

Hyperlink.

The main format is: [link text] (URL 'title text') such as [Baidu] (https://www.baidu.com/))

Pictures. The syntax format is basically the same as the hyperlink, except that there is one more in front, such as:

! [qrcode] (https://i.loli.net/2017/07/21/5971b83e826e3.jpeg)

Emphasize. At present, this official account mainly emphasizes [words for everyone's attention at the end of the article], such as:

* * coding01 looks forward to your attention * *

The code. It is mainly divided into code block and inline code. There must be at least one blank line before and after the code block, and at least one Tab or four spaces before each line of code. Inline code: insert inline code through ``.

Editor

When you choose to write in Markdown, you naturally need to choose an editor that is handy and easy to use. Because I use Mac, I focus on choosing among these editors:

Mou

Mou used to be the most popular Markdown editor on OSX, without one. But the maintenance has stopped now. I remember I spent money on crowdfunding at that time, and I haven't released a new version yet.

Day One 2

Day One 2 is the award-winning diary APP on iOS and OSX platforms. With its excellent design, simple and easy-to-use features, and fresh, elegant and simple interface, it has naturally become the first choice to record life diaries. Day One has been recommended many times, and I also started with the limited exemption of App Store, which has become a good tool for me to record my life log.

Recently, however, it was found that there was a problem of typesetting format when converting Markdown to HTML and pasting it into the Wechat public background editor.

MacDown

MacDown is an open source Markdown editor for macOS, released under the MIT License. It is heavily influenced by Chen Luo's Mou.

MacDown is a free and open source Markdown editor deeply influenced by Mou. When I wrote this article, I edited it using MacDown.

Other

At present, there are many kinds of Markdown editors on the market, such as MarkdownPad, sublime, Atom, IDEA Markdown, Cmd Markdown, Markdown Here, Mark Flying Elephant and so on. Each of these editors has its own advantages, but if it is combined with the editing of articles on Wechat official account, it will highlight their respective shortcomings. Because we need to convert Markdown to HTML, and then directly copy and paste it into the official account editor of Wechat, which can be saved and used directly. One of the most important features is the need to be able to highly customize HTML format and typesetting, so in the end I chose to use the MacDown editor.

Customizable typesetting CSS

The MacDown interface is mainly divided into left and right windows, the left window is the editing window, editing Markdown content, using [theme] to design editing style; the right window is the preview window, you can directly view the HTML effect, and use [CSS] to design the preview style, which also determines that we finally export the HTML effect.

The above is how to customize typesetting articles in markdown. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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

Servers

Wechat

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

12
Report