• 【公式输入】 latex和markdown支持的公式写法整理


    由于markdown可以支持latex【非常强大】的数学公式的渲染因此下文整理内容两种均支持。
    markdown借鉴latex的公式输入
    主要是在jupyter-notebook和CSDN等基本多支持markdown,因此做这个公式输入的整理还是方便日后自己查找使用。

    • 需要记住的是,以下公式均写在$$内来被识别为latex公式。

    1. 希腊字母大小写

    大写的首字母将全拼首字母大写即可。
    $\全拼$
    如:

    $\alpha$   $\beta$    $\Delta$     $\lambda$   $\delta$    $\Lambda$        $\Delta$
    
    • 1

    α \alpha α β \beta β Δ \Delta Δ λ \lambda λ δ \delta δ Λ \Lambda Λ Δ \Delta Δ
    全表如下:
    在这里插入图片描述

    2. 上下标

    上标 ^
    下标 _

    下标的斜体和直立体意义不同

    $x^2$    $a_2$  $x^{i+j}$  $x_i$    $x_{\text i}$
    
    • 1

    x 2 x^2 x2 , a 2 a_2 a2, x i + j x^{i+j} xi+j, x i x_i xi, x i x_{\text i} xi

    3. 分式

    \frac{分子}{分母}
    单个字符还可以这么写:
    \frac 分子 分母

    \dfrac是显示类型(display),可以显示的更大一点,作用一样

    $\frac{1}{2}$    $\frac 1 2$   $\frac{x+y}{1+z}$
    
    • 1

    1 2 \dfrac{1}{2} 21 , 1 2 \dfrac 1 2 21 , x + y 1 + z \dfrac{x+y}{1+z} 1+zx+y

    4. 根式

    \sqrt
    默认是平方根
    \sqrt[根的次数]{数值}
    自定义根

    $\sqrt 2$  $\sqrt{x+y}$  $\sqrt[3]{x+y}$
    
    • 1

    2 \sqrt 2 2 , x + y \sqrt{x+y} x+y , x + y 3 \sqrt[3]{x+y} 3x+y

    5.运算符

    • 加,减,正负,负正,乘,点乘,除
    +. -, $\pm$, $\mp$, $\times$, $\cdot$, $\div$
    
    • 1

    +. -, ± \pm ±, ∓ \mp , × \times ×, ⋅ \cdot , ÷ \div ÷


    • 大小于,大于等于,小于等于,远大于,远小于,不等于,约等于,恒等于
    $>$,  $<$, $\ge$, $\le$, $\gg$, $\ll$, $\ne$, $\approx$, $\equiv$
    
    • 1

    > > >, < < <, ≥ \ge , ≤ \le , ≫ \gg , ≪ \ll , ≠ \ne =, ≈ \approx , ≡ \equiv


    • 交集,并集,属于,不属于,子集,真子集,空集
     $\cap$, $\cup$, $\in$, $\notin$, $\subseteq$, $\subsetneqq$, $\varnothing$
    
    • 1

    ∩ \cap , ∪ \cup , ∈ \in , ∉ \notin /, ⊆ \subseteq , ⫋ \subsetneqq , ∅ \varnothing


    • 对任意,存在,不存在, 因为,所以
    $\forall$, $\exists$, $\nexists$, $\because$, $\therefore$
    
    • 1

    ∀ \forall , ∃ \exists , ∄ \nexists , ∵ \because , ∴ \therefore


    • 实数集,有理数集,自然数,整数集, 正整数集
    $\ R$, $\ Q$, $\ N$, $\ Z$, $\Z_+$
    
    • 1

      R \ R  R,   Q \ Q  Q,   N \ N  N,   Z \ Z  Z, Z + \Z_+ Z+


    • 傅里叶,花体傅里叶, 横向省略号,竖向省略号,斜向省略号
    $\mathcal F$, $\mathscr F$, $\cdots$, $\vdots$, $\ddots$
    
    • 1

    F \mathcal F F, F \mathscr F F, ⋯ \cdots , ⋮ \vdots , ⋱ \ddots


    • 无穷,偏微分,梯度算子,正比于,度
    $\infty$, $\partial$, $\nabla$, $\propto$, $\degree$
    
    • 1

    ∞ \infty , ∂ \partial , ∇ \nabla , ∝ \propto , ° \degree °


    • 三角函数, 对数
    $\sin x$, $\sec x$, $\cosh x$, $\log_2 x$, $\ln n$
    
    • 1

    sin ⁡ x \sin x sinx, sec ⁡ x \sec x secx, cosh ⁡ x \cosh x coshx, log ⁡ 2 x \log_2 x log2x, ln ⁡ n \ln n lnn


    • 趋于,极限,强制位置(极限位置强制到下方)
    $\to0$, $\lim_{x \to0}$, $\cosh x$, $\log_2 x$, $\ln n$
    
    • 1

    → 0 \to0 0, lim ⁡ x → 0 \lim_{x \to0} limx0, lim ⁡ x → 0 \lim\limits_{x \to0} x0lim


    6. 大型运算符

    求和,求积,积分,多重积分,回路积分,双重回路积分

    $\to0$, $\lim_{x \to0}$, $\cosh x$, $\log_2 x$, $\ln n$
    
    • 1

    ∑ \sum , ∏ \prod , ∫ \int , ∬ \iint , ∭ \iiint , ∮ \oint , ∯ \oiint


    一个例子:中间的,表示空格

    $\int_{-\infty}^0 f(x)\, \text d x$
    
    • 1

    ∫ − ∞ 0 f ( x )   d x \int_{-\infty}^0 f(x)\, \text d x 0f(x)dx

    7.空格

    $a  a$
    $a\  a$
    $a\quad a$
    $a\qquad a$
    
    • 1
    • 2
    • 3
    • 4

    a a a a aa
    a   a a\ a a a
    a a a\quad a aa
    a a a\qquad a aa

    8. 标注符号

    单字符向量(固定长度箭头短),多字符向量(箭头长度随着字符数量的增多变化),单均值,多字符均值

    y ⃗ \vec y y , A B → \overrightarrow {AB} AB , y ˉ \bar y yˉ, A B ‾ \overline {AB} AB
    种类如下:
    在这里插入图片描述

    9. 箭头

    左箭头,双向右箭头,等价于,长左箭头

      ← \leftarrow , ⇒ \Rightarrow , ↔ \leftrightarrow , ⟵ \longleftarrow

      在这里插入图片描述

      10. 括号,定界符

      大括号,左侧上取整,右侧上取整,左侧下取整,右侧下取整,绝对值,

      $\{ \}$
      
      • 1

      { } \{ \} {} ⌈ \lceil , ⌉ \rceil , ⌊ \lfloor , ⌋ \rfloor , ∣ ∣ | | ∣∣

      11. 多行公式

      多行环境:\代表换行,默认右对其,可以在等号前加&实现等号对齐,具体是&后一对齐

      $$\begin{align}
      a\\f\\c
      \end{align}$$
      
      • 1
      • 2
      • 3

      a + b = c a + f = d d d c d d = j f d

      a+b=ca+f=dddcdd=jfd" role="presentation" style="position: relative;">a+b=ca+f=dddcdd=jfd
      a+ba+fcdd=c=ddd=jfd

      12. 大括号,条件表达

      $$f(x)=
       \begin{cases}
       \sin x, -1\le x\le2\\
       \cos x, else
       \end{cases}$$
      
      • 1
      • 2
      • 3
      • 4
      • 5

      f ( x ) = { sin ⁡ x , − 1 ≤ x ≤ 2 cos ⁡ x , e l s e f(x)=

      {sinx,1x2cosx,else" role="presentation" style="position: relative;">{sinx,1x2cosx,else
      f(x)={sinx,1cosx,x2else

      13. 矩阵

      转置

      $$ \bf B^T $$
      
      • 1

      B T \bf B^T BT

      I、无括号

      没有括号的矩阵

      $$
      \begin{matrix}
      a & b&c&\cdots&d\\
      \vdots & \vdots & \vdots & \ddots &\vdots \\
      e & k & f & \cdots & 0
      \end{matrix} 
      $$
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7

      a b c ⋯ d ⋮ ⋮ ⋮ ⋱ ⋮ e k f ⋯ 0

      abcdekf0" role="presentation" style="position: relative;">abcdekf0
      aebkcfd0

      II、方括号

      方括号的矩阵

      $$
      \begin{bmatrix}
      a & b&c&\cdots&d\\
      \vdots & \vdots & \vdots & \ddots &\vdots \\
      e & k & f & \cdots & 0
      \end{bmatrix} 
      $$
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7

      [ a b c ⋯ d ⋮ ⋮ ⋮ ⋱ ⋮ e k f ⋯ 0 ]

      [abcdekf0]" role="presentation" style="position: relative;">[abcdekf0]
      aebkcfd0

      III、圆形括号

      圆括号的矩阵

      $$
      \begin{pmatrix}
      a & b&c&\cdots&d\\
      \vdots & \vdots & \vdots & \ddots &\vdots \\
      e & k & f & \cdots & 0
      \end{pmatrix} 
      $$
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7

      ( a b c ⋯ d ⋮ ⋮ ⋮ ⋱ ⋮ e k f ⋯ 0 )

      (abcdekf0)" role="presentation" style="position: relative;">(abcdekf0)
      aebkcfd0

      IV、行列式写法

      行列式

      $$ 
      \begin{vmatrix}
      a & b&c&\cdots&d\\
      \vdots & \vdots & \vdots & \ddots &\vdots \\
      e & k & f & \cdots & 0
      \end{vmatrix} 
      $$
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7

      ∣ a b c ⋯ d ⋮ ⋮ ⋮ ⋱ ⋮ e k f ⋯ 0 ∣

      |abcdekf0|" role="presentation" style="position: relative;">|abcdekf0|
      aebkcfd0

    • 相关阅读:
      含文档+PPT+源码等]精品基于SSM的社团管理系统[包运行成功]程序设计源码计算机毕设
      b树和b+树
      芯片设计:一颗芯片到底是如何诞生的(上)
      Gartner发布2022年新兴技术成熟度曲线,推动沉浸式、AI自动化发展
      GAMES101-ASSIGNMENT7(作业7)
      AH8691-60V降压至3.3V电源芯片:ESOP8封装解决方案
      Android Studio Error “Unsupported class file major version 61“---异常信息记录
      2022年湖北武汉建设厅特种作业操作证书如何获取?怎么报考呢?
      根据您的数据量定制的ChatGPT,改变客户服务的方式
      通付盾APP尽职调查报告:守护移动应用安全新篇章
    • 原文地址:https://blog.csdn.net/Eric_Sober/article/details/126490060