
Introduction to MathJax!
Mathjax 从入门到入土 | Introduction of MathJax rendering - inline math, display math, line breaks, equation numbering, matrices, tables, cases, and complex formulas.
MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers, with built-in support for assistive technology like screen readers, including automatic speech generation and an expression explorer that can be used to investigate typeset mathematics on a more granular level than the complete expression. It requires no setup on the part of the user (no plugins to download or software to install), so the page author can write web documents that include mathematics and be confident that users will be able to view it naturally and easily. Simply include MathJax and some mathematics in a web page, and MathJax does the rest.
See http://www.mathjax.org/ for additional details about MathJax, and https://docs.mathjax.org for the MathJax documentation.
使用MathJax时,需要用一些适当的标记告诉MathJax某段文本是公式代码。此外,MathJax中的公式排版有两种方式,inline和displayed。inline表示公式嵌入到文本段中$...$,displayed表示公式独自成为一个段落$$ \n...\n $$。
Hexo-theme-Redefine-X配备的Mathjax v4.1.1支持以single $和double $$作为Mathjax标识符。
1. Inline Math 行内公式
Here are some examples of the Inline Math
The quadratic formula is <!--mathjax:0:inline:sp-->, where
Euler’s identity:
Greeek Letters
Lowercase Greek letters:
You may take reference to following latex:
1 | \alpha, \beta, \gamma, \delta, \epsilon, \varepsilon, \zeta, \eta, \theta, \vartheta, \iota, \kappa, \lambda, \mu, \nu, \xi, o, \pi, \varpi, \rho, \varrho, \sigma, \varsigma, \tau, \upsilon, \phi, \varphi, \chi, \psi, \omega |
For uppercase Greek letters, some of them can directly represented by the English capital letters. Uppercase Greek Letters with latex:
You may take reference to following latex:
1 | \Gamma, \Delta, \Theta, \Lambda, \Xi, \Pi, \Sigma, \Upsilon, \Phi, \Psi, \Omega |
Some variations of Greek letters:
You may take reference to following latex:
1 | \hbar, \imath, \jmath, \ell, \Re, \Im, \aleph, \beth, \gimel, \daleth, \wp, \mho, \backepsilon, \partial, \eth, \complement, \Bbbk, \circledS, \S |
2. Display Math 行间公式
Font Types
Use \mathbb or \Bbb to display blackboard bold characters. This font is often used to represent real numbers, integers, rational numbers, and complex numbers.
Use \mathbf to display bold text
Use \mathrm to display Roman fonts
Use \mathscr to display cursive fonts
Use \mathfrak to display Fraktur letters (a type of German font)
Use \mathtt to display printer fonts
3. Line Breaks with \\ 换行测试
Sometimes, it might be necessary to align the equal signs in a series of formulas, such as:
At this point, a format like \begin{align}... \end{align} is required. Within this format, & is used to indicate the positions where alignment is needed.
4. Equation Numbering 公式编号
1 | $$ |
1 | $$ |
1 | $$ |
5. Matrices 矩阵
Plain matrix:
1 | $$ |
Parenthesized matrix:
1 | $$ |
Bracketed matrix:
1 | $$ |
Augmented Matrix:
1 | $$ |
Determinant:
1 | $$ |
Giatn Matrix:
1 | $$ |
Small inline matrix: The rotation matrix
6. Tables (Arrays) 表格
7. Cases 分类式 (Piecewise Functions)
8. Complex / Large Formulas 复杂大型公式
Taylor Series 泰勒展开
Fourier Transform 傅里叶变换
Product notation
Nested fractions 嵌套分式
Multi-line aligned derivation 多行对齐推导
Multiline equation system 方程组
Decorated expressions
9. Special Symbols & Operators 特殊符号
10. Mixed Content 混合内容
Here is a paragraph with inline math
And after the equation, we continue with more text. The Christoffel symbols
Here is an extremely complex example of a MathJax array table, which combines multi-line merging (visual merging), nested arrays, various mathematical symbols (calculus, linear algebra, complex functions, special functions), and double-line borders, fully demonstrating the complex layout capabilities of the array environment.
Here are some extra equations provided for references:
- Title: Introduction to MathJax!
- Author: Jason-JP-Yang
- Created at : 2026-02-20 12:00:00
- Updated at : 2026-09-09 13:12:58
- Link: https://blog.jason-yang.top/2026/02/20/MathJax-Introduction/
- License: This work is licensed under CC BY-NC-SA 4.0.