^-^
Life love
latex & markdown math input
最近更新:2025-06-18   |   字数总计:1.5k   |   阅读估时:7分钟   |   阅读量:
  1. 1、嵌入代码块
  2. 2、文本相关
    1. 2.1修改更换字体的颜色、字体、大小等
    2. 查看电脑已安装的字体的方法
    3. 2.2修改背景色
    4. 2.3脚注
    5. 2.6文字居中/居左等
  3. 3、链接语法
    1. 3.1基本语法
    2. 3.2如何链接到文本内容
  4. 4、数学语法
    1. 4.0 插入数学符号/公式
    2. 4.1 希腊字母
      1. example(α):
    3. 4.2 分式、开方、上下划线、向量
      1. example(除法):
    4. 4.3 定界符
      1. example(行列式):
      2. 输入矩阵的方法
    5. 4.4 积分、连加(乘)、交并集、积分
      1. example(Σ):
    6. 4.5 其他符号
      1. 常用的数学符号
    7. 4.6 分段函数
    8. 4.7排列组合
    9. 4.8 如何对齐=
  5. 5.复选框
  6. 6.Mermaid语法
  • added
  • 参考资料

    1、嵌入代码块

    整行代码块使用三个反单引号 `(半角的~键)

    行内代码块使用两个反单引号`,将代码内容夹在其间即可

    2、文本相关

    2.1修改更换字体的颜色、字体、大小等
    1
    2
    3
    4
    5
    6
    7
    <font face="黑体">黑体字</font>
    <font face="微软雅黑">微软雅黑</font>
    <font face="STCAIYUN">华文彩云</font>
    <font color=blue>蓝色</font>
    <font color=#008000>绿色</font>
    <font color=Red>红色</font>
    <font size=5>尺寸</font>
    1
    <font face="xx" color=xxxx size=xxx>xxx</font>
    查看电脑已安装的字体的方法

    1、设置——字体(fonts)

    2、control panel——fonts

    2.2修改背景色
    1
    2
    <table><tr><td bgcolor=red>设置的背景色是:red</td></tr></table>

    2.3脚注
    1
    2
    这是一个注脚[^1]。
    [^1]:注脚就实现了

    这是一个注脚[1].

    2.6文字居中/居左等
    1
    2
    3
    <center>居中</center>
    <p align="left">居左</p>
    <p align="right">居右</p>
    居中

    居左

    居右

    3、链接语法

    3.1基本语法
    1
    [文本描述](文本地址)
    1
    <y-shi23tsinghua@outlook.com>
    3.2如何链接到文本内容
    1
    <span id="example">example</span>

    创建的链接是[example](#example)

    比如:

    [direct to the end](#end)

    direct to the end

    4、数学语法

    4.0 插入数学符号/公式
    1
    使用“$$”插入行内公式,使用“$$(enter)$$”插入行间公式

    更改字体:

    1
    >$\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZabc123}$

    4.1 希腊字母

    c9d0c6bef37185f69397a3811c3e56f1

    example(α):
    1
    2
    3
    $$
    \alpha \tag1
    $$

    4.2 分式、开方、上下划线、向量

    be41ccfc7f6da7a6bf3ea2402b72087d

    example(除法):
    1
    2
    3
    >$$
    >\frac{abc}{xyz} \tag2
    >$$

    4.3 定界符

    3584ca9757b18ccda9fc2df09049b410

    example(行列式):
    1
    2
    3
    4
    5
    6
    7
    $$
    \left|\begin{matrix}
    a&b&c\\
    d&e&f\\
    g&h&i
    \end{matrix}\right|
    $$

    输入矩阵的方法
    4.4 积分、连加(乘)、交并集、积分

    63f120e5a92375eabbeb19290819eb53

    example(Σ):
    1
    2
    3
    4
    $$
    \sum_{i=0}^n \frac{1}{i^2}
    \prod_{i=0}^n \frac{1}{i^2}
    $$

    4.5 其他符号

    6

    4ab5708b902c7e815de4f4e97587aadb

    7bcd894d0256856484511485f89592e3

    常用的数学符号
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    $$
    \angle
    \hat{y}
    \rightarrow
    \Rightarrow
    \Longrightarrow
    \overline{a+b+c}
    \overbrace{a+\underbrace{b+c}^3+d}^2
    \nabla
    \therefore
    \because
    \infity
    \forall
    \exists
    \not=
    \neq
    \equiv
    \leq
    \geq
    \in
    $$

    4.6 分段函数
    1
    2
    3
    4
    5
    6
    7
    $$
    f(x) =
    \begin{cases}
    2x,\,\,x>0\\
    3x,\,\,x\le0\\
    \end{cases}
    $$

    4.7排列组合
    1
    2
    3
    4
    $C_n^m$
    $A_n^m$
    $\binom{m}{n}$
    ${m\choose n}$

    4.8 如何对齐=

    aligned 对齐的

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    $$\begin{aligned}
    KPI&=(N+S)W \\
    PI&=N+S \\
    I&=W
    \end{aligned}$$

    $$\begin{aligned}
    loss&=(y_i-Q(s,a;\theta))^2 \\
    &=(r+\gamma \max Q(s^{'},a^{'};\theta^{-})-Q(s,a;\theta)) ^2\\
    \end{aligned}$$

    5.复选框

    1
    2
    3
    4
    - [x]已勾选
    - []未勾选
    * [x]已勾选
    + [x]已勾选
    • [x] 已勾选

    • [ ] 未勾选

    • [x] 已勾选

    • [x] 已勾选

    6.Mermaid语法

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    flowchart TD
    A[开始] --> B[输入一个整数N]
    B --> C{N >= 4 且 N是偶数?}
    C -- 否 --> D[输出input error] --> E[结束]
    C -- 是 --> F[设置 p1 = 2]
    F --> G{p1 <= N / 2?}
    G -- 否 --> D
    G -- 是 --> H[计算 p2 = N - p1]
    H --> I{p1和p2都是素数?}
    I -- 是 --> J[输出 N = p1 + p2] --> E
    I -- 否 --> K[设置 p1 = p1 + 1] --> G

    插入代码,选择mermaid

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    gantt

    dateFormat YYYY-MM-DD
    title Adding GANTT diagram functionality to mermaid
    excludes :excludes the named dates/days from being included in a charted task..
    section A section
    Completed task :done, des1, 2020-01-06,2020-01-08
    Active task :active, des2, 2020-01-09, 3d
    Future task : des3, after des2, 5d
    Future task2 : des4, after des3, 5d

    section Critical tasks
    Completed task in the critical line :crit, done, 2020-01-06,24h
    Implement parser and jison :crit, done, after des1, 2d
    Create tests for parser :crit, active, 3d
    Future task in critical line :crit, 5d
    Create tests for renderer :2d
    Add to mermaid :1d

    section Documentation
    Describe gantt syntax :active, a1, after des1, 3d
    Add gantt diagram to demo page :after a1 , 20h
    Add another diagram to demo page :doc1, after a1 , 48h

    section Last section
    Describe gantt syntax :after doc1, 3d
    Add gantt diagram to demo page :20h
    Add another diagram to demo page :48h

    👉原文链接CSDN👈

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    ```mermaid
    gantt
    title 这是个甘特图的栗子🌰

    dateFormat MM-DD

    section 软件协同开发课程
    项目启动 :done,des1,03-09,7d
    项目计划 :done,des2,after des1,6d
    需求分析 :done,des3,after des2,9d
    软件设计 :done,des4,after des3,12d
    软件编码 :crit,active,des5,04-07,20d
    软件测试 :des6,04-14,15d
    项目交付 :des7,after des6,4d
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    gantt
    title 这是个甘特图的栗子🌰

    dateFormat MM-DD

    section 软件协同开发课程
    项目启动 :done,des1,03-09,7d
    项目计划 :done,des2,after des1,6d
    需求分析 :done,des3,after des2,9d
    软件设计 :done,des4,after des3,12d
    软件编码 :crit,active,des5,04-07,20d
    软件测试 :des6,04-14,15d
    项目交付 :des7,after des6,4d
    1
    2
    3
    4
    5
    6
    pie
    title 看文章经常点赞的程序员的脱单情况
    "已和女神结婚" : 200
    "已脱单,对象非常漂亮" : 132
    "已女神被表白,考虑是否接受" : 40
    "女神即将表白" : 100
    1
    2
    3
    4
    5
    6
    pie
    title 看文章经常点赞的程序员的脱单情况
    "已和女神结婚" : 200
    "已脱单,对象非常漂亮" : 132
    "已女神被表白,考虑是否接受" : 40
    "女神即将表白" : 100
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    classDiagram
    class Student {
    +String name
    +int age
    +void study()
    }
    class Teacher {
    +String subject
    +void teach()
    }
    Student --> Teacher : 被教授
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    sequenceDiagram
    participant Alice
    participant Bob
    Alice->>John: Hello John, how are you?
    loop Healthcheck
    John->>John: Fight against hypochondria
    end
    Note right of John: Rational thoughts<br/>prevail...
    John-->>Alice: Great!
    John->>Bob: How about you?
    Bob-->>John: Jolly good!

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    sequenceDiagram
    participant Alice
    participant Bob
    Alice->>John: Hello John, how are you?
    loop Healthcheck
    John->>John: Fight against hypochondria
    end
    Note right of John: Rational thoughts<br/>prevail...
    John-->>Alice: Great!
    John->>Bob: How about you?
    Bob-->>John: Jolly good!

    1
    2
    3
    4
    ```mermaid
    graph LR
    A["这是A"]
    A-->B-->C
    1
    2
    3
    graph LR
    A["这是A"]
    A-->B-->C

    似乎暂不支持flowchat

    1
    2
    3
    4
    5
    6
    7
    8
    9
    ``` mermaid
    flowchat
    st=>start:开始
    e=>end:结束
    op=>operation:我的操作
    cond=>condition:确认?
    st->op->cond
    cond(yes)->e
    cond(no)->op
    1
    2
    3
    4
    5
    6
    7
    8
    9
    flowchat
    st=>start:开始
    e=>end:结束
    op=>operation:我的操作
    cond=>condition:确认?

    st->op->cond
    cond(yes)->e
    cond(no)->op

    added

    1
    \mathcal{F}^{-1}[\hat{f}(\omega)]

    参考资料

    1、数学公式 and 数学公式

    2、

    😋The end


    1. 脚注1 ↩︎