Markdown efficiency tools

In the last introduction to Markdown article , we have a preliminary understanding of Markdown, a tool for writing and editing. Next, let's take a look at what other tools and methods to further improve editing efficiency?

1. Formula editing tool

Question: Sometimes we use formulas in articles. If you enter them one by one, the symbols and marks will take a lot of time. Is there a faster way?

Yes, this is Mathpix. We can take a screenshot of the formula picture, then recognize and convert it into the corresponding format in Mathpix, and then copy and paste it into the Markdown document.

Download it from the Mathpix official website . First, we need to register an account. The free account can be used 50 times a month; the student account can be used 100 times a month and need to register with the school mailbox; professional users need to pay 4.99 US dollars a month and the number of uses is unlimited. If you don't use it often, just register as a free user and download Mathpix.

Open the Mathpix software and log in to the account you just registered. Then open the page where you want to capture the formula, and then click the icon in the upper left corner, as shown in the figure below, you can take a screenshot:
Mathpix interface

The intercepted formula image will be automatically displayed in Mathpix and recognized and converted, as shown in the figure below, we can select the required format. In the result item at the bottom of the figure, the second is an in-line formula, and the third is an independent formula. Just click the button indicated by the arrow in the figure to copy the content and paste it into the Markdown document. The green progress bar at the bottom in the figure represents Confidence. The longer the progress bar, the higher the accuracy and reliability of the conversion.
Mathpix formula recognition example

The following formula is the effect of copying and pasting from Mathpix to Markdown document in the example.
z = w 1 x 1 +… + wmxmz=w_{1} x_{1}+\ldots+w_{m} x_{m}with=w1x1++wmxm

2. Document Conversion

Convert Markdown to PDF document in VSCode

To convert Markdown to PDF, in the preview view , click the right-click menu, and a series of document conversion methods will appear, as shown in the figure.
Select the document conversion method in the preview view

When you see this menu, you might think of using the PDF (prince) option, but the conversion effect is not as good as the Chrome (Puppeteer)> PDF option selected in the figure. You can try to convert and compare the output PDF document display effect.

Do you have any concerns, afraid that Markdown documents will become PDF documents after conversion? What if I make a mistake and cannot find the original document?
Please rest assured, this conversion is to output a PDF document separately, and the Markdown document itself will not be modified.

Convert Markdown to Word document

Here we will use the "Swiss Army Knife" of the document conversion industry-Pandoc, which can convert many document types.

(1) If you are using Python and Anaconda is installed on your computer, then it contains the Pandoc module. You can run Pandoc on the command line interface of Anaconda .

For example, if I want to convert a Markdown document with the file name "mdtest" into Word, first convert the Anaconda command line interface to the folder where mdtest.md is located, and then run the command:
pandoc mdtest.md -o mdtest.docx
it will be converted in the current folder and a new one will be generated mdtest.docx document.

(2) To convert Markdown to Word document in Typora or VSCode,
first install Pandoc software. Enter Pandoc official website download page , click the latest installation package, for example, I was a Windows system, you select the .msi file suffix to download and install.

You may have questions. As mentioned in the previous method (1), Anaconda includes the Pandoc module. Should we install it again?
Although Anaconda includes Pandoc, this feature must be used in the Anaconda command line. If we want to operate in the software, we need to install Pandoc separately.

When you need to use the cross-reference for graphics processing, you also need to install:
pip install pandoc-fignos

For Typora , now click File> Export on the menu bar and select the Word (.docx) option to export Word documents.

For VScode , you also need to add the following sentence at the beginning of the Markdown document to define the file format after Pandoc conversion. path is the storage location of the output Word document after conversion, it is required. The next three items are selected according to your needs, toc is a directory option, and true means to generate a directory. Please pay attention to the indentation format of the statement and the ---tags before and after the statement .

---
title: "当前Markdown文档名"
output:
    word_document:
        path: /当前Markdown文档名.docx
        toc: true
        toc_depth: 6
        number_sections: true
---

Then in the preview view , click the Pandoc option in the right-click menu to complete the document conversion.

Convert Markdown documents online to rich text format

Now everyone is willing to write articles on the Internet to share and exchange knowledge. So, have you ever spent a lot of time on the layout of WeChat articles and other platforms?

As mentioned earlier, Markdown can greatly shorten typesetting and editing time. We thought, if we write an article with a Markdown editor, and then use a document conversion tool similar to the one described above to convert it to the format of the network platform.

The answer is of course, and there are still many choices. I will share two online conversion tools I have used here . If you have any conversion tools that you find good, please leave a message and share with you.
WeChat Official Account Format Editor
Features: Simple style, very suitable for typesetting articles. If it is a poem, it may be difficult to adjust the line break, font size, etc.
Md2All
features: powerful functions, many layout styles to choose from, if you have a little understanding of the syntax of web page editing Javascript, you can also adjust the layout yourself.

When using Markdown to edit documents, what productivity tools do you have handy? Welcome to share and exchange.

Reference articles:
1. How to write a paper in Markdown?
2. Pandoc installation and use (transfer)

Guess you like

Origin blog.csdn.net/applebear1123/article/details/113029278