markdown and latex usage records

Here are some markdown and Latex syntaxes to prevent them from being forgotten for a long time. The syntax is not complete, only the ones I commonly use are listed.
The markdown editor uses Typora, what you see is what you get, and there is automatic completion of grammar.
In addition, here are several mathematical formula editing websites. If you cannot remember the mathematical formulas, you can generate formula codes on demand. Just choose one that is easy to use:
http://www.hostmath.com/
https://www.2weima.com/ gongshi.html?gongshi=power
https://latex.codecogs.com/eqneditor/editor.php
https://www.latexlive.com/##

markdown syntax

Official tutorial: https://markdown.com.cn/

title

Use # spaces to create titles. The shortcut key ctrl + numnum uses the number below the F area.

 #  一级标题
 ## 二级标题
 ### 三级标题

Effect:

first level title

Second level title

Level 5 heading

emphasize

Bold: **粗体**Shortcut keys ctrl + B
Italic: *斜体* Shortcut keys: ctrl + I
Effect:

bold
italic

newline

There are two commonly used ways to wrap a line: the first one is to add a few more spaces at the end of the line (two spaces don’t work, just add a few more), the second way is to use HTML tags, and some syntax in HTML <br/>
Applicable in markdown.
Effect:

Hahahahahahahahahahahahahahaha
This is the second line (I can’t seem to see it...)

Quote

> Plus space, it's those gray blocks.
Effect:

This is the quote.

You can do nesting dolls

list

To separate the header and the record, whether to add colons to the left and right of the dividing line :can control the arrangement (left-aligned, centered, right-aligned)

| 姓名 | 性别 |
| :------ | :----: |
| 张三   | 女   |
| 李哈哈  | 男    |

Effect:

Name gender
Zhang San female
Li Haha male

Insert code

Just wrap a word with backticks ( ``). The backticks are tababove the key to switch to English input.
Three backticks can enclose multiple lines of code: [```代码块```]

First line: three backticks + programming language (cannot be highlighted without adding, harmless) ```python

Second line: print("hello")

Last line: three backticks```

Effect:
apple

print("hello")

Insert picture

Use an exclamation point (!), then add alternative text within square brackets, place the image link in parentheses, and add an optional image title text after the link in parentheses.

The image address can be a local path or a link address of a network image. The referenced network image may be protected from hotlinking and cannot be displayed. Generally, when we CTRL V the image in markdown, the image can be automatically displayed and converted into the corresponding syntax.

Insert image Markdown syntax code:

![图片描述](图片地址)

Link

Use []()the form where the two parentheses are closely connected without spaces.
[百度](baidu.com)The text in square brackets is the displayed text, and the URL in parentheses is the link.
If you do not use text display, you can directly make the link clickable and wrap it in angle <>brackets. You need to add httpor https. Such as <https://baidu.com>
the effect:
Baidu
https://baidu.com

Latex syntax

Inserting latex formulas into markdown can be done in-line or in multiple lines. Current lines of mathematical formulas can be implemented
using a single package. Inserting multi-line formulas generally looks like this:$$ 公式 $

$$
公式
$$

For the specific formula to be used, you can go to the corresponding website and enter it, then paste the generated code over.
Here is some simple syntax for recording:

newline

To wrap a line in latex, \\just add double slashes at the end of the line.

Greek letters and trigonometric functions

Generally, Greek letters and specific letters in mathematics have corresponding syntax: backslash plus name \name. You can search for the specific name, and the markdown syntax corresponding to Greek letters is enough.
For example, in these, the first letter is capitalized to represent the uppercase Greek letters.
\sin=> sin ⁡ \sinsin
\omicron =>the \omicronο
\Omicron => O \Omicron O
\alpha =>α \alphaa
etc……

score line

\frac{1}{2} => 1 2 \frac{1}{2} 21

Alignment

First, you need to set up an environment, that is, alignthis code, before you can use it &to represent the corresponding alignment position.
There are other ways to use the environment, you can search and find out by yourself.

\begin{align}
a =& 1+1
abc =& 1+2+3
\end{align}

Equation:
a = 1 + 1 abc = 1 + 2 + 3 \begin{align} a =& 1+1 \\ abc =& 1+2+3 \end{align}a=abc=1+11+2+3

Guess you like

Origin blog.csdn.net/m0_67313306/article/details/130001004