KaTeX and Mermaid Test

This article is used to test the KaTeX and Mermaid features.

Configuration

Frontmatter Configuration

YAML
---
katex: true
mermaid: true
---
Нажмите, чтобы развернуть и увидеть больше

Global Configuration

YAML
# hugo.yaml
katex:
  enabled: true
  delimiters: 
    - left: "$$"
      right: "$$"
      display: true
    - left: "$"
      right: "$"
      display: false

mermaid:
  enabled: true
Нажмите, чтобы развернуть и увидеть больше

KaTeX Test

Inline Formula

This is an inline formula: $E = mc^2$, Einstein’s mass-energy equivalence formula.

Another example:When $a \neq 0$, the solutions to the quadratic equation $ax^2 + bx + c = 0$ are $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$.

Block Formula

Quadratic Formula

$$x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$$

Euler’s Formula

$$e^{i\pi} + 1 = 0$$

Integral Formula

$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$

Matrix Representation

$$\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}$$

Summation Formula

$$\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$$

Common Mathematical Symbols Test

Using predefined macros: $\RR$, $\NN$, $\ZZ$, $\QQ$, $\CC$

Авторские права

Автор: Иван Чёрный

Ссылка: https://r4ven.ru/posts/katex-and-mermaid-test/

Лицензия: CC BY-NC-SA 4.0

Использование материалов блога разрешается при условии: указания авторства/источника, некоммерческого использования и сохранения лицензии.

Начать поиск

Введите ключевые слова для поиска статей

↑↓
ESC
⌘K Горячая клавиша