Markdown语法学习2 (数学公式)

前言(abstract)

这篇文章是Markdown语法学习系列的第二篇文章,本文就是使用markdown写的,主要介绍Markdown中插入数学公式的语法。平时用来记数学笔记真的很不戳, 希望帮到大家哈哈哈
对了,本文有很多英语,正好帮大家锻炼英语理解啦哈哈哈

目录(Table)

文章目录

  • 前言(abstract)
  • 目录(Table)
  • 数学公式(KaTeX)
    • 基本格式介绍(Basic format introduction)
    • 普通数学部分(Normal math portion)
      • 下标
      • 上标
      • 分数(Fraction)
      • 加减乘除(Plus, minus, multiply, divide)
      • 开方(Square root)
        • 开平方
        • 开n次方
      • 绝对值(Absolute value)
      • 幂次方(Power)
        • 指数只有一位
        • 指数有多位
      • 角度(Angle)
      • 方程(Equation)
        • 单个方程:直接写就好
        • 方程组
    • 高等数学部分(Advanced math portion)
      • 积分(Integral)
      • 极限(Limit)
      • 连分(Continued fraction)
      • 矩阵(Matrix)
      • 向量(Vector)
    • 希腊字母(Greek letters)
      • 大写希腊字母(Uppercase Greek letters)
      • 小写希腊字母(Lowercase Greek letters)
      • 特殊希腊字母(Special Greek letters)
    • 特殊符号(Special symbols)
      • 无穷大(Infinity)
      • 无穷小
      • 省略号(Ellipsis)

数学公式(KaTeX)

arkdown中插入数学公式,需要使用KaTeX语法。

基本格式介绍(Basic format introduction)

$内容$$$内容$$

  • $$ 包裹的内容为数学公式
  • $$$$ 包裹的内容为多行数学公式

我们会发现很多的符号都是通过 \ + 符号 来表示的, 比如 \frac 表示分数符号, \sum 表示求和符号, \int 表示积分符号等等。

因此我们在下面详细介绍一下

普通数学部分(Normal math portion)

下标

*format: $下标内容_({)上标内容(})}$
example: $x_{1 + y}$
display: x 1 + y x_{1 + y} x1+y
usage: It is used to create subscripts in a mathematical expression.

上标

*format: $上标内容^({)下标内容(})$
example: $x^{2 + y}$
display: x 2 + y x^{2 + y} x2+y
usage: It is used to create superscripts in a mathematical expression.

分数(Fraction)

format: $\frac{分子}{分母}$
example: $\frac{1}{2}$
display: 1 2 \frac{1}{2} 21
usage: It is used to create a fraction where “分子” (numerator) and “分母” (denominator) are the numbers or expressions you want to display above and below the fraction line.

加减乘除(Plus, minus, multiply, divide)

format: $(运算符)$
example: $+$, $-$, $\times$, $\div$
display: + + +, − - , × \times ×, ÷ \div ÷
usage: It is used to perform arithmetic operations such as addition, subtraction, multiplication, and division.

开方(Square root)

  • 开平方

    format: $\sqrt{x}$
    example: $\sqrt{2}$
    display: 2 \sqrt{2} 2
    usage: It is used to find the square root of a number or expression.

  • 开n次方

    format: $\sqrt[n]{x}$
    example: $\sqrt[3]{27}$
    display: 27 3 \sqrt[3]{27} 327
    usage: It is used to find the n-th root of a number or expression.

绝对值(Absolute value)

format: $|x|$
example: $|-2|$
display: ∣ − 2 ∣ |-2| 2
usage: It is used to find the absolute value of a number or expression.

幂次方(Power)

  • 指数只有一位

    format: $x^y$
    example: $2^3$
    display: 2 3 2^3 23
    usage: It is used to raise a number to the power of another number or expression.

  • 指数有多位

    format: $x^{y1 + y2}$
    example: $x^{y1 + y2}$
    display: x y 1 + y 2 x^{y1 + y2} xy1+y2
    usage: It is used to raise a number to the power of multiple numbers or expressions.

角度(Angle)

format: $\theta$
example: $\theta$
display: θ \theta θ
usage: It is used to represent an angle in radians or degrees.

方程(Equation)

  • 单个方程:直接写就好
  • 方程组
    format:
    $$\begin{cases}
    条件1 & 符号1 \\ 
    条件2 & 符号2 \\
    \vdots & \vdots \\
    条件n & 符号n
    \end{cases}$$`
    
    example:
    $$\begin{cases}
    2x+3y=5 \\
    4x-2y=10
    \end{cases}$$
    
    display:
    { x > 0 2 x + 3 y = 5 4 x − 2 y = 10 \begin{cases} x > 0 \\ 2x+3y=5 \\ 4x-2y=10 \end{cases} x>02x+3y=54x2y=10
    usage: It is used to display a set of equations with their respective conditions and symbols.

高等数学部分(Advanced math portion)

积分(Integral)

format: $\int_{下限}{上限} 函数(d变量)$
example: $\int_{0}^{1} x^2 dx$
display: ∫ 0 1 x 2 d x \int_{0}^{1} x^2 dx 01x2dx
usage: It is used to find the area(面积) under a curve(曲线) or a function.

极限(Limit)

format: $\lim_{变量\to 无穷大(小)} 函数$
example: $\lim_{x\to 0} \frac{1}{x}$
display: lim ⁡ x → 0 1 x \lim_{x\to 0} \frac{1}{x} limx0x1
usage: It is used to find the limit of a function as the variable approaches a certain value.

连分(Continued fraction)

矩阵(Matrix)

format:

\begin{bmatrix}
元素1 & 元素2 & ... \\(换行) 
元素3 & 元素4 & ... \\(换行) 
... & ... & ... 
\end{bmatrix}

example:

\begin{bmatrix} 
1 & 2 & 3 \\ 
4 & 5 & 6 \\ 
7 & 8 & 9 
\end{bmatrix}

display:
[ 1 2 3 4 5 6 7 8 9 ] \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} 147258369
usage: It is used to display a matrix.

向量(Vector)

v ⃗ = [ 1 2 3 ] \vec{v} = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} v =123

希腊字母(Greek letters)

大写希腊字母(Uppercase Greek letters)

A \Alpha A Alpha
B \Beta B Beta

Γ \Gamma Γ Gamma
Δ \Delta Δ Delta

E \Epsilon E Epsilon
Z \Zeta Z Zeta

H \Eta H Eta
Θ \Theta Θ Theta

小写希腊字母(Lowercase Greek letters)

α \alpha α alpha
β \beta β beta

γ \gamma γ gamma
δ \delta δ delta

ϵ \epsilon ϵ epsilon
ζ \zeta ζ zeta

η \eta η eta
θ \theta θ theta

特殊希腊字母(Special Greek letters)

π \pi π pi
ρ \rho ρ rho
σ \sigma σ sigma
τ \tau τ tau
ϕ \phi ϕ phi
χ \chi χ chi
ψ \psi ψ psi

特殊符号(Special symbols)

无穷大(Infinity)

format: $(+)(-)\infty$
example: + ∞ +\infty +, − ∞ -\infty
∞ \infty

无穷小

0

省略号(Ellipsis)

format: $(\dots)$
example: … \dots

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值