math/知识点/MathJax数学公式.md

54 lines
2.0 KiB
Markdown
Raw Normal View History

2022-08-16 05:12:13 +00:00
# MathJax数学公式
2022-08-16 05:04:43 +00:00
- $ 3^2+4^2=5^2 $
- $ 3^3+4^3+5^3=6^3 $
- $ 10^2+11^2+12^2=13^2+14^2 $
- $ 11^3+12^3+13^3+14^3=20^3 $
- $ 21^2+22^2+23^2+24^2=25^2+26^2+27^2 $
- $ 36^2+37^2+38^2+39^2+40^2=41^2+42^2+43^2+44^2 $
- $ 55^2+56^2+57^2+58^2+59^2+60^2=61^2+62^2+63^2+64^2+65^2 $
2022-08-16 09:23:51 +00:00
| 名称 | LaTeX语法 | 显示效果 | 用途 |
| ------------ | ----------------------- | ---------------- | ------------ |
| 普通字体 | `\mathnormal{N}` | $\mathnormal{N}$ | |
| 手写字体 | `\mathcal{N}` | $\mathcal{N}$ | |
| 空心粗体 | `\mathbb{N}`或`\Bbb{N}` | $\mathbb{N}$ | 表示数集 |
| 紧贴 | `a\!b` | $a\!b$ | 缩进1/6m宽度 |
| 无空格 | `ab` | $ab$ | 无间距 |
| 小空格 | `a\,b` | $a\,b$ | 间距1/6m宽度 |
| 大空格 | `a\ b` | $a\ b$ | 间距1/3m宽度 |
| quad空格 | `a \quad b` | $a \quad b$ | 间距1m宽度 |
| 两个quad空格 | `a \qquad b` | $a \qquad b$ | 间距2m宽度 |
| | | | |
2022-08-16 05:04:43 +00:00
方程组
2022-08-16 06:33:54 +00:00
$\begin{cases}
2+1=2 \\\\
2+2=4
\end{cases}$
2022-08-16 09:09:23 +00:00
$\begin{equation}
2022-08-16 09:23:51 +00:00
E = mc^2
2022-08-16 09:09:23 +00:00
\end{equation}$
2022-08-16 09:23:51 +00:00
## 在线资料
- [MathJax官方网站](https://www.mathjax.org/)
- [KaTeX语法支持表](https://katex.org/docs/support_table.html)
- [ChinaTeX数学排版常见问题集](http://static.latexstudio.net/wp-content/uploads/2018/02/ChinaTeXMathFAQ_V1.1.pdf)
应用到Gitea中添加以下内容到`templates/custom/header.tmpl`
```html
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
```