当前位置:网站首页>Typora uses latex to insert mathematical formulas

Typora uses latex to insert mathematical formulas

2020-12-28 16:17:05 Concession, as before

LaTeX Formula use reference

Summarize the common ways to write probability notes , Easy to find .

Insert formula

LaTeX There are two kinds of mathematical formulas in : The formula in the row and the independent formula . The formula in the line is put in the text and mixed with other words , Independent formulas line up independently .

The formula in the row

use $...$ Enclose the formula .

Independent formula

use $$...$$ Enclose the formula in the form of no number . By default, the elements between blocks are centered .

The subscript

^ Means superscript , _ Indicates subscript . If the content of the superscript is more than one character , Need to use {} Put all of this together . Superscripts and subscripts can be nested , It can also be used at the same time .

  • Example :
$$A^1_2$$
  • Show :
  • A 2 1 A^1_2 A21

Brackets and separators

()[] and | The symbol itself , Use \{\} To express {} . When you want to display large brackets or separators , Use \left and \right command .
Some special brackets :

Input Show Input Show
\langle * \langle * \rangle * \rangle *
\lceil ⌈ \lceil \rceil ⌉ \rceil
\lfloor ⌊ \lfloor \rfloor ⌋ \rfloor
\lbrace { \lbrace { \rbrace } \rbrace }

Enter the score

Usually use \frac { molecular } { The denominator } The command produces a score , Scores can be nested .
The convenience can be entered directly \frac ab To quickly generate a a b \frac ab ba .
If the fraction is complex , Can also be used molecular \over The denominator command , At this time, the score is only one level .

  • Example :
$$\frac{a-1}{b-1} \quad and \quad {a+1\over b+1}$$
  • Show : a − 1 b − 1 a n d a + 1 b + 1 \frac{a-1}{b-1} \quad and \quad {a+1\over b+1} b1a1andb+1a+1

Enter the square root

Use \sqrt [ Root index , Omitted is 2] { The number of squares to be split } Command input square .

  • Example :
$$\sqrt{2} \quad and \quad \sqrt[n]{3}$$
  • Show : 2 a n d 3 n \sqrt{2} \quad and \quad \sqrt[n]{3} 2 andn3

Enter the ellipsis

There are two kinds of ellipsis in mathematical formulas ,\ldots Represents an ellipsis aligned with the bottom line of the text ,\cdots Represents an ellipsis that aligns with the center line of the text .

  • Example :
$$f(x_1,x_2,\underbrace{\ldots}_{\rm ldots} ,x_n) = x_1^2 + x_2^2 + \underbrace{\cdots}_{\rm cdots} + x_n^2$$
  • Show : f ( x 1 , x 2 , … ⏟ l d o t s , x n ) = x 1 2 + x 2 2 + ⋯ ⏟ c d o t s + x n 2 f(x_1,x_2,\underbrace{\ldots}_{\rm ldots} ,x_n) = x_1^2 + x_2^2 + \underbrace{\cdots}_{\rm cdots} + x_n^2 f(x1,x2,ldots ,xn)=x12+x22+cdots +xn2

Input derivative

Partial derivative

Input Show
\frac{\partial}{\partial}f(x) ∂ ∂ f ( x ) \frac{\partial}{\partial}f(x) f(x)

Integral derivatives

For the derivative of integer order, it is generally input like this :

Input Show
f’(x) f ′ ( x ) f'(x) f(x)
f’’’(x) f ′ ′ ( x ) f''(x) f(x)
f’’’(x) f ′ ′ ′ ( x ) f'''(x) f(x)

Higher derivative

$$
Example :

$$\frac{\mathrm{d}f}{\mathrm{d}t}$$

Show : d f d t \frac{\mathrm{d}f}{\mathrm{d}t} dtdf

Enter the integral

Use \int_ Lower limit of integral ^ Upper limit of points { Integrand expression } To enter an integral .

Example :

$$\int_0^1 {x^2} \,{\rm d}x$$

Show : ∫ 0 1 x 2   d x \int_0^1 {x^2} \,{\rm d}x 01x2dx

Input limit operation

Use \lim_{ Variable \to expression } expression To enter a limit . If there is a need , You can change \to Symbol to any symbol .

Example :

$$ \lim_{n \to +\infty} \frac{1}{n(n+1)} \quad and \quad \lim_{x\leftarrow{ Example }} \frac{1}{n(n+1)} $$

Show : lim ⁡ n → + ∞ 1 n ( n + 1 ) a n d lim ⁡ x ← in example 1 n ( n + 1 ) \lim_{n \to +\infty} \frac{1}{n(n+1)} \quad and \quad \lim_{x\leftarrow{ Example }} \frac{1}{n(n+1)} n+limn(n+1)1andx in example limn(n+1)1

Input accumulation 、 Multiplicative operation

Use \sum_{ Subscript expression }^{ Superscript expression } { Cumulative expression } To enter an accumulation .
similarly , Use \prod \bigcup \bigcap To input the tired multiplication separately 、 Union and intersection .
When such symbols are displayed in the row, the superscript and subscript expressions will move to the upper right corner and the lower right corner .

  • Example :
$$\sum_{i=1}^n \frac{1}{i^2} \quad $$
$$\quad \prod_{i=1}^n \frac{1}{i^2} \quad $$
$$ \quad \bigcup_{i=1}^{2} R$$
  • Show :
    ∑ i = 1 n 1 i 2 \sum_{i=1}^n \frac{1}{i^2} \quad i=1ni21
    ∏ i = 1 n 1 i 2 \quad \prod_{i=1}^n \frac{1}{i^2} \quad i=1ni21
    ⋃ i = 1 2 R \quad \bigcup_{i=1}^{2} R i=12R

Enter the Greek alphabet

Input \ Full English name of small Greek letters and \ Initial capital Greek full English name To enter lower case and upper case Greek letters .
For capital Greek letters the same as the existing letters , Just type in capital letters .

Input Show Input Show Input Show Input Show
\alpha α \alpha α A A A A \beta β \beta β B B B B
\gamma γ \gamma γ \Gamma Γ \Gamma Γ \delta δ \delta δ \Delta Δ \Delta Δ
\epsilon ϵ \epsilon ϵ E E E E \zeta ζ \zeta ζ Z Z Z Z
\eta η \eta η H H H H \theta θ \theta θ \Theta Θ \Theta Θ
\iota ι \iota ι I I I I \kappa κ \kappa κ K K K K
\lambda λ \lambda λ \Lambda Λ \Lambda Λ \mu μ \mu μ M M M M
\nu ν \nu ν N N N N \xi ξ \xi ξ \Xi Ξ \Xi Ξ
o o o o O O O O \pi π \pi π \Pi Π \Pi Π
\rho ρ \rho ρ P P P P \sigma σ \sigma σ \Sigma Σ \Sigma Σ
\tau τ \tau τ T T T T \upsilon υ \upsilon υ \Upsilon Υ \Upsilon Υ
\phi ϕ \phi ϕ \Phi Φ \Phi Φ \chi χ \chi χ X X X X
\psi ψ \psi ψ \Psi Ψ \Psi Ψ \omega ω \omega ω \Omega Ω \Omega Ω

Some letters have variable specific forms , With \var- start .

In lowercase In capital form Variable form Show
\epsilon E \varepsilon ϵ ∣ E ∣ ε \epsilon \mid E \mid \varepsilon ϵEε
\theta \Theta \vartheta θ ∣ Θ ∣ ϑ \theta \mid \Theta \mid \vartheta θΘϑ
\rho P \varrho ρ ∣ P ∣ ϱ \rho \mid P \mid \varrho ρPϱ
\sigma \Sigma \varsigma σ ∣ Σ ∣ ς \sigma \mid \Sigma \mid \varsigma σΣς
\phi \Phi \varphi ϕ ∣ Φ ∣ φ \phi \mid \Phi \mid \varphi ϕΦφ

Enter other special characters

Relational operator

Input Show Input Show Input Show Input Show
\pm ± \pm ± \times × \times × \div ÷ \div ÷ \mid ∣ \mid
\nmid ∤ \nmid \cdot ⋅ \cdot \circ ∘ \circ \ast ∗ \ast
\bigodot ⨀ \bigodot \bigotimes ⨂ \bigotimes \bigoplus ⨁ \bigoplus \leq ≤ \leq
\geq ≥ \geq \neq ≠ \neq = \approx ≈ \approx \equiv ≡ \equiv
\sum ∑ \sum \prod ∏ \prod \coprod ∐ \coprod \backslash \ \backslash \

Set operators

Input Show Input Show Input Show
\emptyset ∅ \emptyset \in ∈ \in \notin ∉ \notin /
\subset ⊂ \subset \supset ⊃ \supset \subseteq ⊆ \subseteq
\supseteq ⊇ \supseteq \bigcap ⋂ \bigcap \bigcup ⋃ \bigcup
\bigvee ⋁ \bigvee \bigwedge ⋀ \bigwedge \biguplus ⨄ \biguplus

Logarithmic operators

Input Show Input Show Input Show
\log log ⁡ \log log \lg lg ⁡ \lg lg \ln ln ⁡ \ln ln

Trigonometric operators

Input Show Input Show Input Show
30^\circ 3 0 ∘ 30^\circ 30 \bot ⊥ \bot \angle A ∠ A \angle A A
\sin sin ⁡ \sin sin \cos cos ⁡ \cos cos \tan tan ⁡ \tan tan
\csc csc ⁡ \csc csc \sec sec ⁡ \sec sec \cot cot ⁡ \cot cot

Calculus operators

Input Show Input Show Input Show
\int ∫ \int \iint ∬ \iint \iiint ∭ \iiint
\iiiint KaTeX parse error: Undefined control sequence: \iiiint at position 1: \̲i̲i̲i̲i̲n̲t̲ \oint ∮ \oint \prime ′ \prime
\lim lim ⁡ \lim lim \infty ∞ \infty \nabla ∇ \nabla

Connecting symbols

Input Show
\overleftarrow{a+b+c+d} a + b + c + d ← \overleftarrow{a+b+c+d} a+b+c+d
\overrightarrow{a+b+c+d} a + b + c + d → \overrightarrow{a+b+c+d} a+b+c+d
\overleftrightarrow{a+b+c+d} a + b + c + d \overleftrightarrow{a+b+c+d} a+b+c+d
\underleftarrow{a+b+c+d} a + b + c + d ← \underleftarrow{a+b+c+d} a+b+c+d
\underrightarrow{a+b+c+d} a + b + c + d → \underrightarrow{a+b+c+d} a+b+c+d
\underleftrightarrow{a+b+c+d} a + b + c + d \underleftrightarrow{a+b+c+d} a+b+c+d
\overline{a+b+c+d} a + b + c + d ‾ \overline{a+b+c+d} a+b+c+d
\underline{a+b+c+d} a + b + c + d ‾ \underline{a+b+c+d} a+b+c+d

The arrow symbol

Input Show Input Show
\uparrow ↑ \uparrow \Uparrow ⇑ \Uparrow
\downarrow ↓ \downarrow \Downarrow ⇓ \Downarrow
\leftarrow ← \leftarrow \Leftarrow ⇐ \Leftarrow
\rightarrow → \rightarrow \Rightarrow ⇒ \Rightarrow
\leftrightarrow \leftrightarrow \Leftrightarrow ⇔ \Leftrightarrow
\longleftarrow * \longleftarrow * \Longleftarrow * \Longleftarrow *
\longrightarrow * \longrightarrow * \Longrightarrow * \Longrightarrow *
\longleftrightarrow * \longleftrightarrow * \Longleftrightarrow * \Longleftrightarrow *

Other commands

Add space

There are four kinds of spaces that can be used : \,\;\quad and \qquad .

  • Example :
$$ a \, b \mid a \; b \mid a \quad b \mid a \qquad b $$
  • Show : a   b ∣ a    b ∣ a b ∣ a b a \, b \mid a \; b \mid a \quad b \mid a \qquad b abababab

Of course , Use \text {n A space } The same effect can be achieved .

Add wave lines

$\sim$

  • Example :
 The binomial distribution $$X\sim B(n,p)$$
  • Show :
    Two term branch cloth X ∼ B ( n , p ) The binomial distribution X\sim B(n,p) Two term branch cloth XB(n,p)

The sequence of equations

People often want a neat, centered sequence of equations . Use \begin{align}…\end{align} To create a series of equations , It uses... At the end of each line \\ .
There is no need to declare formula symbols when using equation sequences $ or $$ .

Please note that {align} The sentence is auto number Of , Use {align*} Declare stop auto numbering (^wuyufei Comments ).

  • Example :
$$
\begin{align}
\sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
 & = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\ 
 & = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
 & = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\ 
 & \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right)
\end{align}
$$
  • Show :(Typora It can be displayed normally )
    KaTeX parse error: No such environment: align at position 8: \begin{̲a̲l̲i̲g̲n̲}̲ \sqrt{37} & = …

Conditional expression

Use begin{cases} To create a set of conditional expressions , Insert... In each line of conditions & To specify what needs to be aligned , And use... At the end of each line \\, With end{cases} end .
Conditional expressions do not need to declare $ or $$ Symbol .

  • Example :
$$
        f(n) =
        \begin{cases}
        n/2,  & \text{if $n$ is even} \\
        3n+1, & \text{if $n$ is odd}
        \end{cases}
$$
  • Show :
    f ( n ) = { n / 2 , if  n  is even 3 n + 1 , if  n  is odd f(n) = \begin{cases} n/2, & \text{if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases} f(n)={ n/2,3n+1,if n is evenif n is odd

more

Cmd Markdown Formula guide

版权声明
本文为[Concession, as before]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/20201226002644858Z.html

随机推荐