Markdown Tutorial <3> Mathematical Formula (1)

# Markdown tutorial <3> mathematical formula (1)

1. How to use the formula in markdown

Formula Formula divided between the row line formula, wherein:

  • Row official use$ 数学公式 $
  • Between the lines using the formula$$ 数学公式 $$

2. The upper and lower standard

^Indicate superscript, _he expressed subscript. If the content of the subject up and down more than one character, need {}to include the contents as a whole. The vertical scale can be nested, may be used simultaneously.
For example:
$$x^{y^z} = (1+e^x)^{-2xy^w}$$
Results:
\ [Z ^ X ^ {Y} = (. 1 + X ^ E) ^ {-} 2xy ^ W \]
To both left and right sides of the vertical standard, can \sidesetcommand
for example:
$$ \sideset{^1_2}{^3_4} \bigotimes $$
Results:
\ [\ sideset {^ 1_2} {^ 3_4 } \ bigotimes \]

3. The bracket and delimiters

(), []And |represents the symbol itself, used \{\}to represent the {}. When large to be displayed in parentheses or separator, use \leftand \rightcommand.
The following shows what the large difference between ordinary bracket brackets:
$$ f(x,y,z) = 3y^2z \left( 3+\frac{7x+5}{1+y^2} \right) $$
\ [F (X, Y, Z) = 2Z 3Y ^ \ left (3+ \ FRAC. 5} {+ 7x + Y ^ {2}. 1 \ right) \]
$$ f(x,y,z) = 3y^2z ( 3+\frac{7x+5}{1+y^2} ) $$
\ [f (x, y, z) = 3y ^ 2z (3+ \ frac {7x + 5} {1 + y ^ 2}) \]

It can be seen directly ()obtained brackets fixed size, but the use \left \rightmay vary with the size of the equation in the parentheses is changed.

  • Some special brackets:
Entry display
$$\langle math \rangle$$ \[\langle math \rangle\]
$$\lceil math \rceil$$ \[\lceil math \rceil\]
$$\lfloor math \rfloor$$ \[\lfloor math \rfloor\]
$$\lbrace math \rbrace$$ \[\lbrace math \rbrace\]

4. Score

Usually \frac {分子} {分母}command produces a fraction \ (\ FRAC molecule} {} {denominator \) , the score can be nested.
Convenient case may be directly input \frac abto quickly generate a \ (\ FRAC ab & \) .
If the fraction is simple molecule may also be used \ over denominator command, and the score only one layer.
Examples:
$$\frac{a-1}{b-1} \quad and \quad {a+1 \over b+1}$$
\ [\ {FRAC. 1-A. 1-B} {} \ Quad and \ Quad. 1 + {A \ B over. 1} + \]

5. prescribing

Use \sqrt [根指数,省略时为2] {被开方数}the command input prescribing.
Examples:
$$\sqrt{2} \quad and \quad \sqrt[n]{3}$$
\ [\ sqrt {2} \ Quad and \ Quad \ sqrt [n-] {}. 3 \]

6. ellipsis

Mathematical formulas, there are two common ellipsis, \ldotsit represents the bottom line of text aligned ellipses, \cdotsrepresents the center line of text aligned ellipses.
Examples:
$$f(x_1,x_2,\underbrace{\ldots}_{ldots},x_n) = x^2_1 + x_2^2 + \overbrace{\cdots}^{cdots} + x_n^2 $$
\ [F (x_1, x_2, \ underbrace {\ ldots}} _ {ldots, x_n) = the 2_1-th ^ X ^ 2 + x_2 + \ overbrace {\ cdots cdots}} ^ {^ 2 + x_n \]

7. Vector

Used \vec{矢量}to automatically generate a vector. You can also use \overrightarrowother commands over a custom symbol alphabet.
Examples:
$$\vec{a} \cdot \vec{b}=0$$
\ [\ VEC {A} \ CDOT \ VEC {B} = 0 \]
$$\overleftarrow{xy} \quad and \quad \overleftrightarrow{xy} \quad and \quad \overrightarrow{xy}$$
\ [\ overleftarrow {XY} \ Quad and \ Quad \ overleftrightarrow {XY} \ Quad and \ Quad \ overrightarrow {XY} \]

Meanwhile, if \underrightarrowyou can generate an arrow at the bottom of the character.
\ [\ underrightarrow {x + y
} \] Notably, \vecthe arrow to produce a certain size limit, do not become larger than after, the \overrightarrowarrow will be generated as the content changes size.
$$\vec{abcd} \quad and \quad \overrightarrow{abcd} $$
\ [\ vec {abcd} \ quad and \ quad \ overrightarrow {abcd} \]

8. Points

Use \int_积分下限^积分上限 {被积表达式}to enter a credit.
Examples:
$$\int_0^1 {x^2} \, {\rm d}x$$
Display:
\ [\ INT_0. 1 ^ X ^ {2} \, {\ RM D} X \]

9. Limit Operation

Use \ lim_ {variable \ to expression} expressions to enter a limit. If there is demand, you can change the \ to the symbol to any symbol.

example:

$$ \lim_{n \to +\infty} \frac{1}{n(n+1)} \quad and \quad \lim_{x\leftarrow{示例}} \frac{1}{n(n+1)} $$
Display:
\ [\ lim_ {n-\ to + \ infty} \ FRAC {. 1} {n-(n-+. 1)} \ Quad and \ Quad \ lim_ {X \ LeftArrow {Example}} \ frac {1} { n ( n + 1)} \]

10. accumulated, that multiplies

Using \sum_{下标表达式}^{上标表达式} {累加表达式}an accumulation input.
Similarly, using \prod \bigcup \bigcaprespectively multiply input tired, union and intersection.
When such a symbol within the display up and down the line will be moved to the upper right corner subscript expression and the bottom right corner.

例子:
$$\sum_{i=1}^n \frac{1}{i^2} \quad and \quad \prod_{i=1}^n \frac{1}{i^2} \quad and \quad \bigcup_{i=1}^{2} R$$
\[\sum_{i=1}^n \frac{1}{i^2} \quad and \quad \prod_{i=1}^n \frac{1}{i^2} \quad and \quad \bigcup_{i=1}^{2} R\]

11. Greek alphabet

Input \小写希腊字母英文全称and \首字母大写希腊字母英文全称respectively input lowercase and uppercase Greek letters.
For the Greek capital letters with the same existing letters, uppercase letters can be entered directly.

Entry display Entry display
$\alpha$ \(\alpha\) $A$ \(A\)
$\beta$ \(\beta\) $B$ \(B\)
$\gamma$ \(\gamma\) $\Gamma$ \(\Gamma\)
$\delta$ \(\delta\) $\Delta$ \(\Delta\)
$\epsilon$ \(\epsilon\) $E$ \(E\)
$\eta$ \ (\ And \) $H$ \(H\)
$\theta$ \(\theta\) $\Theta$ \(\Theta\)
$\lambda$ \(\lambda\) $\lambda$ \(\lambda\)
$\pi$ \(\pi\) $\Pi$ \(\Pi\)
$\sigma$ \(\sigma\) $\Sigma$ \(\Sigma\)
$\omega$ \(\omega\) $\Omega$ \(\Omega\)

12. The braces and Industry Standard

Use \leftand \rightto create automatic matching the height (in parentheses), [brackets] and braces {}.
Before the end of each use a formula \tag{行标}to achieve the Industry Standard.
example:

$$
f\left(
   \left[
     \frac{
       1+\left\{x,y\right\}
     }{
       \left(
          \frac{x}{y}+\frac{y}{x}
       \right)
       \left(u+1\right)
     }+a
   \right]^{3/2}
\right)
\tag{行标}
$$

\[ f\left( \left[ \frac{ 1+\left\{x,y\right\} }{ \left( \frac{x}{y}+\frac{y}{x} \right) \left(u+1\right) }+a \right]^{3/2} \right) \tag{行标} \]

13. font conversion

Entry Fonts display
\rm Roman \ (\ Rm D \)
\cal Hanatai \(\cal D\)
\it Italy body \(\it D\)
\Bbb Blackboard bold \ (\ Bbb D \)
\bf Bold face \(\bf D\)
\mit Math italic \ (\ What D \)
\sf Other line body \(\sf D\)
\scr handwriting \(\scr D\)
\tt Typewriter body \(\tt D\)
\frak Old German font \ (\ Frak D \)
\boldsymbol Blackbody \(\boldsymbol D\)

Reference 1: Cmd Markdown formula Guidebook
Reference 2: Markdown study notes Equation Editor

Guess you like

Origin www.cnblogs.com/HandleCoding/p/11108922.html