Trouble for lazy people

There are many people who work hard to write wechat public accounts. Looking at the typesetting tools they use, you can see how much work they have to put into typesetting an article.





Note that they are a heading, a paragraph, an introduction and so on, using style templates to insert content. The result of this typesetting will indeed meet the author’s requirements. But I really can’t do the layout.

I didn’t even use Word for my doctoral thesis.

I use LaTeX.

Why so unconventional? Not intentionally, but with LaTeX you only need code words. Wouldn’t it be better for programs to worry about style?

In the last few years, Markdown has taken off, and NOW I don’t even bother to use LaTeX except for mathematical formulas.

You can easily see my philosophy — yes, how to cut corners.

But at the same time, there is a need to meet demand.

Articles on wechat official accounts are not academic papers, and the formulas and references are rare. The most common styles are headings, text, quotes, images, etc. Markdown is very handy with these things.

I did this for a blog post I wrote with Hexo, and it worked well with Markdown.

However, I encountered setbacks in the layout of wechat official accounts. Because wechat public account does not support Markdown direct typesetting. As OF this writing, only rich text format is supported.





This means that every time I write a Markdown article and preview it with no problems, I need to find a place to convert Markdown to rich text.

At first, I was lazy and did the conversion directly in the editor of wechat public platform using Markdown Here. The results were fine in the preview, but all the images in the text disappeared after the group post. The wechat public account cannot be modified once a group message is sent, and my personal public account can only send one message per day. I’ve been depressed for hours.

Later, I tried several third-party editing tools for wechat public accounts. I found 135 of them to be just so-so.

HTML was generated in this editor with Markdown Here, which was directly converted into rich text when copied out, and posted to the editor of wechat public platform, the title with black font and picture showed normal, and verified that the picture could also be displayed normally after publication.

So I thought I’d found a shortcut to the south.

However, as time went on, I found a problem – although the layout was fine, everything else was out of order. The gap between headings disappears completely, and there is very little space between lines of text, which is all piled up together, making the reading experience very difficult.





Yesterday morning, I got up after 6 o ‘clock to revise an article, and then I planned to send it to the wechat public account.

Paste the past rich text in accordance with the old way, how to see how awkward.

I tried a number of different third-party editors, none of which were ideal, some of which simply didn’t preserve any styles at all.

Suddenly found 135 editor pop-up window to promote VIP function.





Having used the editor as a staging post, I never paid much attention to the “advanced” features. This time I took a look and found “one-click typesetting”. And, among them but all see the past theme, all VIP can use. For a lazy person, how can the temptation of such keywords be tolerated? I immediately ordered a month’s worth.

You really don’t say, after one click typesetting, immediately the line spacing and title format are better. I used a “minimalist” template that was pleasing to look at.

Well, that’s good!

Oh, no!

Why do so many titles come out? !





It turns out that the one-click layout is not smart enough to tell which line is the title in the converted text from Markdown Here! To compensate, it asks the user to set a word threshold (20 by default) below which it is considered a title.





Isn’t that funny? !

I love short sentences!

To make matters worse, it is not easy to manually adjust the title recognition results after typesetting. I accommodate it by lowering the threshold and adding punctuation or merging lines. It doesn’t feel right.

At 7:30, we’re finally done. I copied the typesetting results into the editor of wechat public platform. I previewed it, thought it was okay, and sent it out.

When it was sent, it was a big surprise – all bold fonts were removed from the article.

This is called “one-click typesetting”?

Okay, let’s face it. Luckily, I only bought a VIP for a month.

sobering

Today, I saw Jason Ng’s article “How is the article of the official account typeset?” .

Jason is the author I admire very much. His official account has excellent typesetting, which I admire very much. At first, I thought he was going to talk about how he manually adjusted the style paragraph by paragraph with a third-party editor. I decided to receive a hard-working education and reflect on my laziness. But the more I read, the happier I got — he used Markdown just like me!

However, the difference is that the concept of expert is much clearer than mine.

Since Markdown generates HTML, why not tune in CSS?

Yeah!

Why let a component like Markdown Here dictate the layout style of my articles? Convert Markdown into HTML, and then copy it to the editor of wechat public platform in the way of rich text.

I tried it immediately and it worked very well. But the problem was immediately identified. The problem is Jason’s expectations of his readers.

For readers who “don’t know anything about HTML or CSS,” Jason offers two solutions.

One is that you need to know a designer and a front end engineer, which is a little bit more demanding, but we won’t discuss it here.

Method two is to learn by yourself, see here estimate many people are eager to try.

Suppose there are 10 readers who are interested in the composition of wechat official account Markdown, can 5 of them finish it according to method 2? I’m not that confident.

Why is that?

Because in Jason’s manual, there is a sentence like this:

Spend a day learning how to write a simple Python script that contains the replacements function.

To be honest, I think it’s highly unlikely that someone with no prior programming experience could learn Python at this speed and stick with it.

Jason: That’s understandable. People are like groups. I can imagine that many of the people I know have no technical foundation but are open to learning new things. But it’s not just his friends. Many people without a technical background will cringe when they read this. This is not my assumption, you go to an ordinary university of liberal arts major to teach technical courses for a few years, I’m afraid your idea and I have little.

It’s like an NBA coach asking his players to practice backhand dunking — his players are 2 meters tall and could do it with a little effort. But even if the same NBA coach wrote down the backhand dunk recipe for me, I wouldn’t try it.

The good news is that after a bit of digging around, I’ve discovered the fact that you don’t need to learn Python scripts to use Markdown as a lazy way to type wechat articles.

The process is introduced

To do a good job, he must sharpen his tools.

Jason recommended Ulysses in his article, which is really a writing tool, and I deeply agree with him.

I recommend a companion software called Marked2.





Ulysses articles can be easily exported to Marked2 for preview and then exported to HTML with styles.

You don’t need a script to replace paragraph and heading tags, you just need to modify the custom CSS in Marked2.





I have modified the body paragraph style according to the style information mentioned in Jason’s article:

P, h5 {/ * the font - size: 1.1429 em. * / / * line - height: 1.3125 em. * / margin: 1.3125 em 0; font-size: 15px; letter-spacing: 1px; line-height: 28px; }Copy the code

Preview the exported HTML file in your browser and it looks like this:





Jason recommends converting HTML to rich text in CKEditor and copying it to the wechat public platform editor.

I tried it out and found it really powerful, with a wealth of options in the full version. But for beginners, it’s not intuitive. You can’t even find where to post the HTML source code when you go to the site’s home page.





But why stick with an online editor? Wouldn’t it be nice to find one that works immediately?

I found the wangEditor editor, which is open source and free.





After inserting the HTML source code, preview it and it looks the same.

Post to wechat public platform editor inside, found that all custom styles can be retained.

This is my lazy Markdown layout method inspired by Jason. The wechat public account typesetting problem, which had been bothering me for many days, was solved in this way.


Read more:

  • Markdown two key typesetting wechat official account articles
  • Mobile Markdown writing: Illustration one-click synchronization of seven niu Tu bed