mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 11:12:54 +02:00
chore: update pinned icon position, scrollbar style and katex mathematical demo
This commit is contained in:
parent
d2ca808197
commit
f3edfba62d
9 changed files with 783 additions and 26 deletions
22
pnpm-lock.yaml
generated
22
pnpm-lock.yaml
generated
|
@ -1683,8 +1683,8 @@ packages:
|
|||
duplexer@0.1.2:
|
||||
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
|
||||
|
||||
electron-to-chromium@1.5.129:
|
||||
resolution: {integrity: sha512-JlXUemX4s0+9f8mLqib/bHH8gOHf5elKS6KeWG3sk3xozb/JTq/RLXIv8OKUWiK4Ah00Wm88EFj5PYkFr4RUPA==}
|
||||
electron-to-chromium@1.5.130:
|
||||
resolution: {integrity: sha512-Ou2u7L9j2XLZbhqzyX0jWDj6gA8D3jIfVzt4rikLf3cGBa0VdReuFimBKS9tQJA4+XpeCxj1NoWlfBXzbMa9IA==}
|
||||
|
||||
emmet@2.4.11:
|
||||
resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==}
|
||||
|
@ -1750,8 +1750,8 @@ packages:
|
|||
peerDependencies:
|
||||
eslint: '>=6.0.0'
|
||||
|
||||
eslint-compat-utils@0.6.4:
|
||||
resolution: {integrity: sha512-/u+GQt8NMfXO8w17QendT4gvO5acfxQsAKirAt0LVxDnr2N8YLCVbregaNc/Yhp7NM128DwCaRvr8PLDfeNkQw==}
|
||||
eslint-compat-utils@0.6.5:
|
||||
resolution: {integrity: sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ==}
|
||||
engines: {node: '>=12'}
|
||||
peerDependencies:
|
||||
eslint: '>=6.0.0'
|
||||
|
@ -5319,7 +5319,7 @@ snapshots:
|
|||
browserslist@4.24.4:
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001707
|
||||
electron-to-chromium: 1.5.129
|
||||
electron-to-chromium: 1.5.130
|
||||
node-releases: 2.0.19
|
||||
update-browserslist-db: 1.1.3(browserslist@4.24.4)
|
||||
|
||||
|
@ -5578,7 +5578,7 @@ snapshots:
|
|||
|
||||
duplexer@0.1.2: {}
|
||||
|
||||
electron-to-chromium@1.5.129: {}
|
||||
electron-to-chromium@1.5.130: {}
|
||||
|
||||
emmet@2.4.11:
|
||||
dependencies:
|
||||
|
@ -5659,7 +5659,7 @@ snapshots:
|
|||
eslint: 9.23.0(jiti@2.4.2)
|
||||
semver: 7.7.1
|
||||
|
||||
eslint-compat-utils@0.6.4(eslint@9.23.0(jiti@2.4.2)):
|
||||
eslint-compat-utils@0.6.5(eslint@9.23.0(jiti@2.4.2)):
|
||||
dependencies:
|
||||
eslint: 9.23.0(jiti@2.4.2)
|
||||
semver: 7.7.1
|
||||
|
@ -5702,7 +5702,7 @@ snapshots:
|
|||
'@typescript-eslint/types': 8.29.0
|
||||
astro-eslint-parser: 1.2.2
|
||||
eslint: 9.23.0(jiti@2.4.2)
|
||||
eslint-compat-utils: 0.6.4(eslint@9.23.0(jiti@2.4.2))
|
||||
eslint-compat-utils: 0.6.5(eslint@9.23.0(jiti@2.4.2))
|
||||
globals: 15.15.0
|
||||
postcss: 8.5.3
|
||||
postcss-selector-parser: 7.1.0
|
||||
|
@ -5762,7 +5762,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0(jiti@2.4.2))
|
||||
eslint: 9.23.0(jiti@2.4.2)
|
||||
eslint-compat-utils: 0.6.4(eslint@9.23.0(jiti@2.4.2))
|
||||
eslint-compat-utils: 0.6.5(eslint@9.23.0(jiti@2.4.2))
|
||||
eslint-json-compat-utils: 0.2.1(eslint@9.23.0(jiti@2.4.2))(jsonc-eslint-parser@2.4.0)
|
||||
espree: 10.3.0
|
||||
graphemer: 1.4.0
|
||||
|
@ -5821,7 +5821,7 @@ snapshots:
|
|||
dependencies:
|
||||
debug: 4.4.0
|
||||
eslint: 9.23.0(jiti@2.4.2)
|
||||
eslint-compat-utils: 0.6.4(eslint@9.23.0(jiti@2.4.2))
|
||||
eslint-compat-utils: 0.6.5(eslint@9.23.0(jiti@2.4.2))
|
||||
lodash: 4.17.21
|
||||
toml-eslint-parser: 0.10.0
|
||||
transitivePeerDependencies:
|
||||
|
@ -5869,7 +5869,7 @@ snapshots:
|
|||
debug: 4.4.0
|
||||
escape-string-regexp: 4.0.0
|
||||
eslint: 9.23.0(jiti@2.4.2)
|
||||
eslint-compat-utils: 0.6.4(eslint@9.23.0(jiti@2.4.2))
|
||||
eslint-compat-utils: 0.6.5(eslint@9.23.0(jiti@2.4.2))
|
||||
natural-compare: 1.4.0
|
||||
yaml-eslint-parser: 1.3.0
|
||||
transitivePeerDependencies:
|
||||
|
|
|
@ -45,13 +45,14 @@ function getPostPath(post: Post) {
|
|||
data-disable-transition-on-theme
|
||||
>
|
||||
{post.data.title}
|
||||
|
||||
{/* pinned icon */}
|
||||
{pinned && (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
aria-hidden="true"
|
||||
class="ml-1 inline-block aspect-square w-3.7 shrink-0 translate-y--0.45 lg:(ml-1.8 w-4 translate-y--0.55)"
|
||||
class="ml-1 inline-block aspect-square w-3.7 shrink-0 translate-y--0.45 lg:(ml-1.2 w-4.1)"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path d="M16.5 23.6c.6-6.1 1.1-8.6 7.2-15.5L15.9.4C9 6.5 6.5 7 .4 7.5l7.4 7.4-6.4 7 .7.7 7-6.4zm-.8-21.3 6 6c-5 6.1-5.7 8.1-6.2 12.2L3.4 8.5C7.5 8 9.5 7.3 15.6 2.3Z" />
|
||||
|
|
|
@ -73,9 +73,9 @@ document.addEventListener('astro:after-swap', setupScrollbar)
|
|||
@import 'overlayscrollbars/overlayscrollbars.css';
|
||||
|
||||
.scrollbar-body {
|
||||
--os-size: 0.9rem;
|
||||
--os-padding-perpendicular: 0.2rem;
|
||||
--os-padding-axis: 0.4rem;
|
||||
--os-size: 0.8rem;
|
||||
--os-padding-perpendicular: 0.1rem;
|
||||
--os-padding-axis: 0.2rem;
|
||||
--os-handle-border-radius: 99rem;
|
||||
--os-handle-perpendicular-size: 75%;
|
||||
--os-handle-perpendicular-size-hover: 100%;
|
||||
|
@ -89,17 +89,17 @@ document.addEventListener('astro:after-swap', setupScrollbar)
|
|||
}
|
||||
|
||||
.scrollbar-widget {
|
||||
--os-size: 0.6rem;
|
||||
--os-padding-perpendicular: 0.1rem;
|
||||
--os-padding-axis: 0.2rem;
|
||||
--os-size: 0.5rem;
|
||||
--os-padding-perpendicular: 0;
|
||||
--os-padding-axis: 0;
|
||||
--os-handle-border-radius: 99rem;
|
||||
--os-handle-perpendicular-size: 75%;
|
||||
--os-handle-perpendicular-size-hover: 100%;
|
||||
--os-handle-perpendicular-size-active: 100%;
|
||||
--os-handle-interactive-area-offset: 0.1rem;
|
||||
--os-handle-bg: oklch(var(--un-preset-theme-colors-secondary) / 0.20);
|
||||
--os-handle-bg-hover: oklch(var(--un-preset-theme-colors-secondary) / 0.35);
|
||||
--os-handle-bg-active: oklch(var(--un-preset-theme-colors-secondary) / 0.35);
|
||||
--os-handle-bg: oklch(var(--un-preset-theme-colors-secondary) / 0.15);
|
||||
--os-handle-bg-hover: oklch(var(--un-preset-theme-colors-secondary) / 0.25);
|
||||
--os-handle-bg-active: oklch(var(--un-preset-theme-colors-secondary) / 0.25);
|
||||
--os-handle-min-size: 12%;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
---
|
||||
title: KaTeX Mathematical Demo
|
||||
published: 2025-04-01
|
||||
description: KaTeX is a cross-browser JavaScript library that displays mathematical notation in web browsers. It puts special emphasis on being fast and easy to use. It was initially developed by Khan Academy, and became one of the top five trending projects on GitHub.
|
||||
lang: en
|
||||
abbrlink: katex-mathematical-demo
|
||||
---
|
||||
|
||||
$\KaTeX$ is a cross-browser JavaScript library that displays mathematical notation in web browsers. It puts special emphasis on being fast and easy to use. It was initially developed by Khan Academy, and became one of the top five trending projects on GitHub.
|
||||
KaTeX is a cross-browser JavaScript library that displays mathematical notation in web browsers. It puts special emphasis on being fast and easy to use. It was initially developed by Khan Academy, and became one of the top five trending projects on GitHub.
|
||||
|
||||
## Group Theory
|
||||
|
||||
Burnside's lemma, sometimes also called Burnside's counting theorem, the Cauchy-Frobenius lemma or the orbit-counting theorem
|
||||
Burnside's lemma, sometimes also called Burnside's counting theorem, the Cauchy-Frobenius lemma or the orbit-counting theorem.
|
||||
|
||||
Let $\wedge$ be a group action of a finite group $G$ on a finite set $X$. Then the number $t$ of orbits of the action is given by the formula
|
||||
Let $\wedge$ be a group action of a finite group $G$ on a finite set $X$. Then the number $t$ of orbits of the action is given by the formula.
|
||||
|
||||
$$
|
||||
t=\frac{1}{|G|}\sum_{g\in G}|\text{Fix}(g)|
|
||||
$$
|
||||
|
||||
For each integer $n\ge2$, the quotient group $\mathbb{Z}/n\mathbb{Z}$ is a cyclic group generated by $1+n\mathbb{Z}$ and so $\color{red}{\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}_n}$
|
||||
For each integer $n\ge2$, the quotient group $\mathbb{Z}/n\mathbb{Z}$ is a cyclic group generated by $1+n\mathbb{Z}$ and so $\color{red}{\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}_n}$.
|
||||
|
||||
The quotient group $\mathbb{R}/\mathbb{Z}$ is isomorphic to $([0,1),+_1)$, the group of real numbers in the interval $[0,1)$, under addition modulo 1.
|
||||
|
151
src/content/posts/examples/KaTeX Mathematical Demo-es.md
Normal file
151
src/content/posts/examples/KaTeX Mathematical Demo-es.md
Normal file
|
@ -0,0 +1,151 @@
|
|||
---
|
||||
title: KaTeX Demostración Matemática
|
||||
published: 2025-04-01
|
||||
lang: es
|
||||
abbrlink: katex-mathematical-demo
|
||||
---
|
||||
|
||||
KaTeX es una biblioteca JavaScript multiplataforma que permite visualizar notación matemática en navegadores web. Destaca por su velocidad y facilidad de uso, fue desarrollada inicialmente por Khan Academy y se convirtió en uno de los cinco proyectos más populares de GitHub.
|
||||
|
||||
## Teoría de Grupos
|
||||
|
||||
El lema de Burnside, a veces también llamado teorema de conteo de Burnside, lema de Cauchy-Frobenius o teorema de conteo de órbitas.
|
||||
|
||||
Sea $\wedge$ una acción de grupo de un grupo finito $G$ sobre un conjunto finito $X$. Entonces el número $t$ de órbitas de la acción viene dado por la fórmula.
|
||||
|
||||
$$
|
||||
t=\frac{1}{|G|}\sum_{g\in G}|\text{Fix}(g)|
|
||||
$$
|
||||
|
||||
Para cada entero $n\ge2$, el grupo cociente $\mathbb{Z}/n\mathbb{Z}$ es un grupo cíclico generado por $1+n\mathbb{Z}$ y por tanto $\color{red}{\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}_n}$.
|
||||
|
||||
El grupo cociente $\mathbb{R}/\mathbb{Z}$ es isomorfo a $([0,1),+_1)$, el grupo de números reales en el intervalo $[0,1)$, bajo la adición módulo 1.
|
||||
|
||||
Teorema de Isomorfismo. Sea $\phi\colon(G,\circ)\to(H,*)$ un homomorfismo. Entonces la función
|
||||
|
||||
$$
|
||||
\begin{aligned}
|
||||
f\colon G/\text{Ker}(\phi)&\to\text{Im}(\phi)\\
|
||||
x\text{Ker}(\phi)&\mapsto\phi(x)
|
||||
\end{aligned}
|
||||
$$
|
||||
|
||||
es un isomorfismo, así que
|
||||
|
||||
$$
|
||||
G/\text{Ker}(\phi)\cong \text{Im}(\phi)
|
||||
$$
|
||||
|
||||
## Teorema de Taylor
|
||||
|
||||
Sea la función $f$ diferenciable $(n+1)$ veces en un intervalo abierto que contiene los puntos $a$ y $x$. Entonces
|
||||
|
||||
$$
|
||||
f(x)=f(a)+f'(a)(x-a)+\cdots+\frac{f^{(n)}(a)}{n!}(x-a)^n+R_n(x)
|
||||
$$
|
||||
|
||||
donde
|
||||
|
||||
$$
|
||||
R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1},
|
||||
$$
|
||||
|
||||
para algún $c$ entre $a$ y $x$.
|
||||
|
||||
$\KaTeX$ no tiene una opción de alineación a la derecha, por lo que se utiliza una columna alineada adicional para los números de ecuación. Estos son empujados a la derecha mediante el espaciado mkern, por defecto \mkern100mu. Se pueden utilizar tanto entornos align como align*, así como \tag y \notag.
|
||||
|
||||
## Entorno Align
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{\pi}{4n^2} &= \frac{4^n(n!)^2}{2n^2(2n)!}n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{2n^2(2n)!}2n^2J_n \tag{1} \\
|
||||
&= \frac{4^n}{4(2n)!}\left(\frac{n!}{n}\right)^22n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{$\ddagger$} \\
|
||||
&= \frac{4^{n-1}((n-1)!)^2}{(2n-2)!}J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{2}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## Entorno Align*
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{4^N(N!)^2}{(2N)!}J_N &\leq \frac{4^N(N!)^2}{(2N)!}\frac{\pi^2}{4}\frac{1}{2n+2}I_{2N} \tag{*} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{4^N(N!)^2}{(2N)!}I_{2N} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{\pi}{2} \tag{**} \\
|
||||
&= \frac{\pi^3}{16(N+1)} \\
|
||||
\frac{x}{\sin x} &\leq \frac{\pi}{2} \tag{3} \\
|
||||
\text{por lo tanto} \qquad\qquad x &\leq \frac{\pi}{2}\sin x \tag{4}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## Suma de una Serie
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\sum_{i=1}^{k+1}i &= \left(\sum_{i=1}^{k}i\right) +(k+1) \tag{1} \\
|
||||
&= \frac{k(k+1)}{2}+k+1 \tag{2} \\
|
||||
&= \frac{k(k+1)+2(k+1)}{2} \tag{3} \\
|
||||
&= \frac{(k+1)(k+2)}{2} \tag{4} \\
|
||||
&= \frac{(k+1)((k+1)+1)}{2} \tag{5}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## Notación de Producto
|
||||
|
||||
$$
|
||||
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots
|
||||
= \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
|
||||
\text{ para }\lvert q\rvert < 1.
|
||||
$$
|
||||
|
||||
## Producto Vectorial
|
||||
|
||||
$$
|
||||
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
|
||||
\mathbf{i} & \mathbf{j} & \mathbf{k} \\[1ex]
|
||||
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\[2.5ex]
|
||||
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0
|
||||
\end{vmatrix}
|
||||
$$
|
||||
|
||||
## Ecuaciones de Maxwell
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} &= \frac{4\pi}{c}\vec{\mathbf{j}} \\
|
||||
\nabla \cdot \vec{\mathbf{E}} &= 4 \pi \rho \\
|
||||
\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} &= \vec{\mathbf{0}} \\
|
||||
\nabla \cdot \vec{\mathbf{B}} &= 0
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## Letras Griegas
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega\\
|
||||
&\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi\ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## Flechas
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow\\
|
||||
&\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow\\
|
||||
&\leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow\\
|
||||
&\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup\\
|
||||
&\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## Símbolos
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup\\
|
||||
&\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
*Ejemplos tomados de [KaTeX Live Demo](https://sixthform.info/katex/examples/demo.html)*
|
151
src/content/posts/examples/KaTeX Mathematical Demo-ja.md
Normal file
151
src/content/posts/examples/KaTeX Mathematical Demo-ja.md
Normal file
|
@ -0,0 +1,151 @@
|
|||
---
|
||||
title: KaTeX 数学デモ
|
||||
published: 2025-04-01
|
||||
lang: ja
|
||||
abbrlink: katex-mathematical-demo
|
||||
---
|
||||
|
||||
KaTeX はクロスブラウザ対応の JavaScript ライブラリで、ウェブブラウザ上で数式を表示します。高速性と使いやすさに重点を置き、カーンアカデミーによって開発され、GitHub で最も注目を集める上位5プロジェクトの一つとなりました。
|
||||
|
||||
## 群論
|
||||
|
||||
バーンサイドの補題(Burnside's lemma)は、バーンサイドの計数定理、コーシー・フロベニウスの補題、または軌道計数定理とも呼ばれます。
|
||||
|
||||
有限群 $G$ の有限集合 $X$ への群作用を $\wedge$ とします。このとき、作用の軌道の数 $t$ は次の式で与えられます。
|
||||
|
||||
$$
|
||||
t=\frac{1}{|G|}\sum_{g\in G}|\text{Fix}(g)|
|
||||
$$
|
||||
|
||||
各整数 $n\ge2$ に対して、商群 $\mathbb{Z}/n\mathbb{Z}$ は $1+n\mathbb{Z}$ によって生成される巡回群であり、したがって $\color{red}{\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}_n}$ となります。
|
||||
|
||||
商群 $\mathbb{R}/\mathbb{Z}$ は $([0,1),+_1)$ と同型です。これは区間 $[0,1)$ 上の実数のモジュロ1の加法群です。
|
||||
|
||||
同型定理。準同型 $\phi\colon(G,\circ)\to(H,*)$ に対して、次の関数
|
||||
|
||||
$$
|
||||
\begin{aligned}
|
||||
f\colon G/\text{Ker}(\phi)&\to\text{Im}(\phi)\\
|
||||
x\text{Ker}(\phi)&\mapsto\phi(x)
|
||||
\end{aligned}
|
||||
$$
|
||||
|
||||
は同型であり、したがって
|
||||
|
||||
$$
|
||||
G/\text{Ker}(\phi)\cong \text{Im}(\phi)
|
||||
$$
|
||||
|
||||
## テイラーの定理
|
||||
|
||||
関数 $f$ が点 $a$ と $x$ を含む開区間で $(n+1)$ 回微分可能であるとします。このとき
|
||||
|
||||
$$
|
||||
f(x)=f(a)+f'(a)(x-a)+\cdots+\frac{f^{(n)}(a)}{n!}(x-a)^n+R_n(x)
|
||||
$$
|
||||
|
||||
ここで
|
||||
|
||||
$$
|
||||
R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1},
|
||||
$$
|
||||
|
||||
$a$ と $x$ の間のある点 $c$ に対してです。
|
||||
|
||||
$\KaTeX$ には右揃えのオプションがないため、方程式番号のために追加の位置合わせ列が使用されています。これらは mkern 間隔(デフォルトは \mkern100mu)によって右側に押し出されます。align 環境と align* 環境の両方が使用でき、\tag と \notag も使用できます。
|
||||
|
||||
## Align 環境
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{\pi}{4n^2} &= \frac{4^n(n!)^2}{2n^2(2n)!}n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{2n^2(2n)!}2n^2J_n \tag{1} \\
|
||||
&= \frac{4^n}{4(2n)!}\left(\frac{n!}{n}\right)^22n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{$\ddagger$} \\
|
||||
&= \frac{4^{n-1}((n-1)!)^2}{(2n-2)!}J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{2}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## Align* 環境
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{4^N(N!)^2}{(2N)!}J_N &\leq \frac{4^N(N!)^2}{(2N)!}\frac{\pi^2}{4}\frac{1}{2n+2}I_{2N} \tag{*} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{4^N(N!)^2}{(2N)!}I_{2N} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{\pi}{2} \tag{**} \\
|
||||
&= \frac{\pi^3}{16(N+1)} \\
|
||||
\frac{x}{\sin x} &\leq \frac{\pi}{2} \tag{3} \\
|
||||
\text{したがって} \qquad\qquad x &\leq \frac{\pi}{2}\sin x \tag{4}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## 級数の和
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\sum_{i=1}^{k+1}i &= \left(\sum_{i=1}^{k}i\right) +(k+1) \tag{1} \\
|
||||
&= \frac{k(k+1)}{2}+k+1 \tag{2} \\
|
||||
&= \frac{k(k+1)+2(k+1)}{2} \tag{3} \\
|
||||
&= \frac{(k+1)(k+2)}{2} \tag{4} \\
|
||||
&= \frac{(k+1)((k+1)+1)}{2} \tag{5}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 積の表記
|
||||
|
||||
$$
|
||||
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots
|
||||
= \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
|
||||
\text{ ただし }\lvert q\rvert < 1.
|
||||
$$
|
||||
|
||||
## 外積
|
||||
|
||||
$$
|
||||
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
|
||||
\mathbf{i} & \mathbf{j} & \mathbf{k} \\[1ex]
|
||||
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\[2.5ex]
|
||||
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0
|
||||
\end{vmatrix}
|
||||
$$
|
||||
|
||||
## マクスウェル方程式
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} &= \frac{4\pi}{c}\vec{\mathbf{j}} \\
|
||||
\nabla \cdot \vec{\mathbf{E}} &= 4 \pi \rho \\
|
||||
\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} &= \vec{\mathbf{0}} \\
|
||||
\nabla \cdot \vec{\mathbf{B}} &= 0
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## ギリシャ文字
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega\\
|
||||
&\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi\ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 矢印
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow\\
|
||||
&\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow\\
|
||||
&\leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow\\
|
||||
&\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup\\
|
||||
&\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 記号
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup\\
|
||||
&\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
*サンプルは [KaTeX Live Demo](https://sixthform.info/katex/examples/demo.html) から抜粋しました*
|
151
src/content/posts/examples/KaTeX Mathematical Demo-ru.md
Normal file
151
src/content/posts/examples/KaTeX Mathematical Demo-ru.md
Normal file
|
@ -0,0 +1,151 @@
|
|||
---
|
||||
title: KaTeX Математическая демонстрация
|
||||
published: 2025-04-01
|
||||
lang: ru
|
||||
abbrlink: katex-mathematical-demo
|
||||
---
|
||||
|
||||
KaTeX — это кросс-браузерная JavaScript-библиотека для отображения математических формул в веб-браузерах. Она делает акцент на скорости и удобстве использования, изначально разработана Khan Academy и стала одним из пяти самых популярных проектов на GitHub.
|
||||
|
||||
## Теория групп
|
||||
|
||||
Лемма Бернсайда, иногда также называемая теоремой подсчёта Бернсайда, леммой Коши-Фробениуса или теоремой о подсчёте орбит.
|
||||
|
||||
Пусть $\wedge$ — групповое действие конечной группы $G$ на конечном множестве $X$. Тогда число орбит действия $t$ задаётся формулой.
|
||||
|
||||
$$
|
||||
t=\frac{1}{|G|}\sum_{g\in G}|\text{Fix}(g)|
|
||||
$$
|
||||
|
||||
Для каждого целого числа $n\ge2$ фактор-группа $\mathbb{Z}/n\mathbb{Z}$ является циклической группой, порождённой элементом $1+n\mathbb{Z}$, и поэтому $\color{red}{\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}_n}$.
|
||||
|
||||
Фактор-группа $\mathbb{R}/\mathbb{Z}$ изоморфна $([0,1),+_1)$, группе вещественных чисел в интервале $[0,1)$ с операцией сложения по модулю 1.
|
||||
|
||||
Теорема об изоморфизме. Пусть $\phi\colon(G,\circ)\to(H,*)$ — гомоморфизм. Тогда функция
|
||||
|
||||
$$
|
||||
\begin{aligned}
|
||||
f\colon G/\text{Ker}(\phi)&\to\text{Im}(\phi)\\
|
||||
x\text{Ker}(\phi)&\mapsto\phi(x)
|
||||
\end{aligned}
|
||||
$$
|
||||
|
||||
является изоморфизмом, и поэтому
|
||||
|
||||
$$
|
||||
G/\text{Ker}(\phi)\cong \text{Im}(\phi)
|
||||
$$
|
||||
|
||||
## Теорема Тейлора
|
||||
|
||||
Пусть функция $f$ является $(n+1)$-раз дифференцируемой на открытом интервале, содержащем точки $a$ и $x$. Тогда
|
||||
|
||||
$$
|
||||
f(x)=f(a)+f'(a)(x-a)+\cdots+\frac{f^{(n)}(a)}{n!}(x-a)^n+R_n(x)
|
||||
$$
|
||||
|
||||
где
|
||||
|
||||
$$
|
||||
R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1},
|
||||
$$
|
||||
|
||||
для некоторого $c$ между $a$ и $x$.
|
||||
|
||||
В $\KaTeX$ нет опции выравнивания по правому краю, поэтому для нумерации уравнений используется дополнительный выровненный столбец. Они смещаются вправо с помощью интервала mkern, по умолчанию \mkern100mu. Можно использовать как окружение align, так и align*, а также \tag и \notag.
|
||||
|
||||
## Окружение Align
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{\pi}{4n^2} &= \frac{4^n(n!)^2}{2n^2(2n)!}n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{2n^2(2n)!}2n^2J_n \tag{1} \\
|
||||
&= \frac{4^n}{4(2n)!}\left(\frac{n!}{n}\right)^22n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{$\ddagger$} \\
|
||||
&= \frac{4^{n-1}((n-1)!)^2}{(2n-2)!}J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{2}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## Окружение Align*
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{4^N(N!)^2}{(2N)!}J_N &\leq \frac{4^N(N!)^2}{(2N)!}\frac{\pi^2}{4}\frac{1}{2n+2}I_{2N} \tag{*} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{4^N(N!)^2}{(2N)!}I_{2N} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{\pi}{2} \tag{**} \\
|
||||
&= \frac{\pi^3}{16(N+1)} \\
|
||||
\frac{x}{\sin x} &\leq \frac{\pi}{2} \tag{3} \\
|
||||
\text{таким образом} \qquad\qquad x &\leq \frac{\pi}{2}\sin x \tag{4}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## Сумма ряда
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\sum_{i=1}^{k+1}i &= \left(\sum_{i=1}^{k}i\right) +(k+1) \tag{1} \\
|
||||
&= \frac{k(k+1)}{2}+k+1 \tag{2} \\
|
||||
&= \frac{k(k+1)+2(k+1)}{2} \tag{3} \\
|
||||
&= \frac{(k+1)(k+2)}{2} \tag{4} \\
|
||||
&= \frac{(k+1)((k+1)+1)}{2} \tag{5}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## Символ произведения
|
||||
|
||||
$$
|
||||
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots
|
||||
= \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
|
||||
\text{ для }\lvert q\rvert < 1.
|
||||
$$
|
||||
|
||||
## Векторное произведение
|
||||
|
||||
$$
|
||||
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
|
||||
\mathbf{i} & \mathbf{j} & \mathbf{k} \\[1ex]
|
||||
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\[2.5ex]
|
||||
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0
|
||||
\end{vmatrix}
|
||||
$$
|
||||
|
||||
## Уравнения Максвелла
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} &= \frac{4\pi}{c}\vec{\mathbf{j}} \\
|
||||
\nabla \cdot \vec{\mathbf{E}} &= 4 \pi \rho \\
|
||||
\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} &= \vec{\mathbf{0}} \\
|
||||
\nabla \cdot \vec{\mathbf{B}} &= 0
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## Греческие буквы
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega\\
|
||||
&\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi\ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## Стрелки
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow\\
|
||||
&\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow\\
|
||||
&\leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow\\
|
||||
&\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup\\
|
||||
&\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## Символы
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup\\
|
||||
&\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
*Примеры взяты из [KaTeX Live Demo](https://sixthform.info/katex/examples/demo.html)*
|
151
src/content/posts/examples/KaTeX Mathematical Demo-zh-tw.md
Normal file
151
src/content/posts/examples/KaTeX Mathematical Demo-zh-tw.md
Normal file
|
@ -0,0 +1,151 @@
|
|||
---
|
||||
title: KaTeX 數學演示
|
||||
published: 2025-04-01
|
||||
lang: zh-tw
|
||||
abbrlink: katex-mathematical-demo
|
||||
---
|
||||
|
||||
KaTeX 是一套跨瀏覽器的 JavaScript 函式庫,專為網頁瀏覽器設計以顯示數學符號。開發時特別強調執行效率與操作簡便性,最初由可汗學院開發,現已躋身 GitHub 最受關注的前五大專案之列。
|
||||
|
||||
## 群論
|
||||
|
||||
Burnside 引理,有時也稱為 Burnside 計數定理、Cauchy-Frobenius 引理或軌道計數定理。
|
||||
|
||||
設 $\wedge$ 是有限群 $G$ 在有限集合 $X$ 上的群作用。那麼作用的軌道數 $t$ 由下面的公式給出。
|
||||
|
||||
$$
|
||||
t=\frac{1}{|G|}\sum_{g\in G}|\text{Fix}(g)|
|
||||
$$
|
||||
|
||||
對於每個整數 $n\ge2$,商群 $\mathbb{Z}/n\mathbb{Z}$ 是由 $1+n\mathbb{Z}$ 生成的循環群,因此 $\color{red}{\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}_n}$。
|
||||
|
||||
商群 $\mathbb{R}/\mathbb{Z}$ 同構於 $([0,1),+_1)$,即區間 $[0,1)$ 上以 1 為模的實數加法群。
|
||||
|
||||
同構定理。設 $\phi\colon(G,\circ)\to(H,*)$ 是一個同態。那麼函數
|
||||
|
||||
$$
|
||||
\begin{aligned}
|
||||
f\colon G/\text{Ker}(\phi)&\to\text{Im}(\phi)\\
|
||||
x\text{Ker}(\phi)&\mapsto\phi(x)
|
||||
\end{aligned}
|
||||
$$
|
||||
|
||||
是一個同構,因此
|
||||
|
||||
$$
|
||||
G/\text{Ker}(\phi)\cong \text{Im}(\phi)
|
||||
$$
|
||||
|
||||
## 泰勒定理
|
||||
|
||||
設函數 $f$ 在包含點 $a$ 和 $x$ 的開區間上 $(n+1)$ 次可微。那麼
|
||||
|
||||
$$
|
||||
f(x)=f(a)+f'(a)(x-a)+\cdots+\frac{f^{(n)}(a)}{n!}(x-a)^n+R_n(x)
|
||||
$$
|
||||
|
||||
其中
|
||||
|
||||
$$
|
||||
R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1},
|
||||
$$
|
||||
|
||||
對於 $a$ 和 $x$ 之間的某個 $c$。
|
||||
|
||||
$\KaTeX$ 沒有右對齊選項,因此使用額外的對齊列來顯示方程編號。它們通過 mkern 間距(預設為 \mkern100mu)被推到右側。align 和 align* 環境都可以使用,\tag 和 \notag 也可以使用。
|
||||
|
||||
## Align 環境
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{\pi}{4n^2} &= \frac{4^n(n!)^2}{2n^2(2n)!}n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{2n^2(2n)!}2n^2J_n \tag{1} \\
|
||||
&= \frac{4^n}{4(2n)!}\left(\frac{n!}{n}\right)^22n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{$\ddagger$} \\
|
||||
&= \frac{4^{n-1}((n-1)!)^2}{(2n-2)!}J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{2}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## Align* 環境
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{4^N(N!)^2}{(2N)!}J_N &\leq \frac{4^N(N!)^2}{(2N)!}\frac{\pi^2}{4}\frac{1}{2n+2}I_{2N} \tag{*} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{4^N(N!)^2}{(2N)!}I_{2N} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{\pi}{2} \tag{**} \\
|
||||
&= \frac{\pi^3}{16(N+1)} \\
|
||||
\frac{x}{\sin x} &\leq \frac{\pi}{2} \tag{3} \\
|
||||
\text{所以} \qquad\qquad x &\leq \frac{\pi}{2}\sin x \tag{4}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## 級數求和
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\sum_{i=1}^{k+1}i &= \left(\sum_{i=1}^{k}i\right) +(k+1) \tag{1} \\
|
||||
&= \frac{k(k+1)}{2}+k+1 \tag{2} \\
|
||||
&= \frac{k(k+1)+2(k+1)}{2} \tag{3} \\
|
||||
&= \frac{(k+1)(k+2)}{2} \tag{4} \\
|
||||
&= \frac{(k+1)((k+1)+1)}{2} \tag{5}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 乘積符號
|
||||
|
||||
$$
|
||||
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots
|
||||
= \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
|
||||
\text{ 對於 }\lvert q\rvert < 1.
|
||||
$$
|
||||
|
||||
## 叉積
|
||||
|
||||
$$
|
||||
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
|
||||
\mathbf{i} & \mathbf{j} & \mathbf{k} \\[1ex]
|
||||
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\[2.5ex]
|
||||
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0
|
||||
\end{vmatrix}
|
||||
$$
|
||||
|
||||
## 麥克斯韋方程組
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} &= \frac{4\pi}{c}\vec{\mathbf{j}} \\
|
||||
\nabla \cdot \vec{\mathbf{E}} &= 4 \pi \rho \\
|
||||
\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} &= \vec{\mathbf{0}} \\
|
||||
\nabla \cdot \vec{\mathbf{B}} &= 0
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 希臘字母
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega\\
|
||||
&\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi\ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 箭頭符號
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow\\
|
||||
&\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow\\
|
||||
&\leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow\\
|
||||
&\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup\\
|
||||
&\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 符號
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup\\
|
||||
&\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
*範例取自 [KaTeX Live Demo](https://sixthform.info/katex/examples/demo.html)*
|
151
src/content/posts/examples/KaTeX Mathematical Demo-zh.md
Normal file
151
src/content/posts/examples/KaTeX Mathematical Demo-zh.md
Normal file
|
@ -0,0 +1,151 @@
|
|||
---
|
||||
title: KaTeX 数学演示
|
||||
published: 2025-04-01
|
||||
lang: zh
|
||||
abbrlink: katex-mathematical-demo
|
||||
---
|
||||
|
||||
KaTeX 是一个跨浏览器的 JavaScript 库,可在网页浏览器中渲染数学公式。其设计以快速和易用为核心,最初由可汗学院开发,后成为 GitHub 上最热门的五大项目之一。
|
||||
|
||||
## 群论
|
||||
|
||||
Burnside 引理,有时也称为 Burnside 计数定理、Cauchy-Frobenius 引理或轨道计数定理。
|
||||
|
||||
设 $\wedge$ 是有限群 $G$ 在有限集合 $X$ 上的群作用。那么作用的轨道数 $t$ 由下面的公式给出。
|
||||
|
||||
$$
|
||||
t=\frac{1}{|G|}\sum_{g\in G}|\text{Fix}(g)|
|
||||
$$
|
||||
|
||||
对于每个整数 $n\ge2$,商群 $\mathbb{Z}/n\mathbb{Z}$ 是由 $1+n\mathbb{Z}$ 生成的循环群,因此 $\color{red}{\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}_n}$。
|
||||
|
||||
商群 $\mathbb{R}/\mathbb{Z}$ 同构于 $([0,1),+_1)$,即区间 $[0,1)$ 上以 1 为模的实数加法群。
|
||||
|
||||
同构定理。设 $\phi\colon(G,\circ)\to(H,*)$ 是一个同态。那么函数
|
||||
|
||||
$$
|
||||
\begin{aligned}
|
||||
f\colon G/\text{Ker}(\phi)&\to\text{Im}(\phi)\\
|
||||
x\text{Ker}(\phi)&\mapsto\phi(x)
|
||||
\end{aligned}
|
||||
$$
|
||||
|
||||
是一个同构,因此
|
||||
|
||||
$$
|
||||
G/\text{Ker}(\phi)\cong \text{Im}(\phi)
|
||||
$$
|
||||
|
||||
## 泰勒定理
|
||||
|
||||
设函数 $f$ 在包含点 $a$ 和 $x$ 的开区间上 $(n+1)$ 次可微。那么
|
||||
|
||||
$$
|
||||
f(x)=f(a)+f'(a)(x-a)+\cdots+\frac{f^{(n)}(a)}{n!}(x-a)^n+R_n(x)
|
||||
$$
|
||||
|
||||
其中
|
||||
|
||||
$$
|
||||
R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1},
|
||||
$$
|
||||
|
||||
对于 $a$ 和 $x$ 之间的某个 $c$。
|
||||
|
||||
$\KaTeX$ 没有右对齐选项,因此使用额外的对齐列来显示方程编号。它们通过 mkern 间距(默认为 \mkern100mu)被推到右侧。align 和 align* 环境都可以使用,\tag 和 \notag 也可以使用。
|
||||
|
||||
## Align 环境
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{\pi}{4n^2} &= \frac{4^n(n!)^2}{2n^2(2n)!}n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{2n^2(2n)!}2n^2J_n \tag{1} \\
|
||||
&= \frac{4^n}{4(2n)!}\left(\frac{n!}{n}\right)^22n(2n-1)J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{$\ddagger$} \\
|
||||
&= \frac{4^{n-1}((n-1)!)^2}{(2n-2)!}J_{n-1}-\frac{4^n(n!)^2}{(2n)!}J_n \tag{2}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## Align* 环境
|
||||
|
||||
$$
|
||||
\begin{align}
|
||||
\frac{4^N(N!)^2}{(2N)!}J_N &\leq \frac{4^N(N!)^2}{(2N)!}\frac{\pi^2}{4}\frac{1}{2n+2}I_{2N} \tag{*} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{4^N(N!)^2}{(2N)!}I_{2N} \\
|
||||
&= \frac{\pi^2}{8(N+1)}\frac{\pi}{2} \tag{**} \\
|
||||
&= \frac{\pi^3}{16(N+1)} \\
|
||||
\frac{x}{\sin x} &\leq \frac{\pi}{2} \tag{3} \\
|
||||
\text{所以} \qquad\qquad x &\leq \frac{\pi}{2}\sin x \tag{4}
|
||||
\end{align}
|
||||
$$
|
||||
|
||||
## 级数求和
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\sum_{i=1}^{k+1}i &= \left(\sum_{i=1}^{k}i\right) +(k+1) \tag{1} \\
|
||||
&= \frac{k(k+1)}{2}+k+1 \tag{2} \\
|
||||
&= \frac{k(k+1)+2(k+1)}{2} \tag{3} \\
|
||||
&= \frac{(k+1)(k+2)}{2} \tag{4} \\
|
||||
&= \frac{(k+1)((k+1)+1)}{2} \tag{5}
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 乘积符号
|
||||
|
||||
$$
|
||||
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots
|
||||
= \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
|
||||
\text{ 对于 }\lvert q\rvert < 1.
|
||||
$$
|
||||
|
||||
## 叉积
|
||||
|
||||
$$
|
||||
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
|
||||
\mathbf{i} & \mathbf{j} & \mathbf{k} \\[1ex]
|
||||
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\[2.5ex]
|
||||
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0
|
||||
\end{vmatrix}
|
||||
$$
|
||||
|
||||
## 麦克斯韦方程组
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} &= \frac{4\pi}{c}\vec{\mathbf{j}} \\
|
||||
\nabla \cdot \vec{\mathbf{E}} &= 4 \pi \rho \\
|
||||
\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} &= \vec{\mathbf{0}} \\
|
||||
\nabla \cdot \vec{\mathbf{B}} &= 0
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 希腊字母
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega\\
|
||||
&\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi\ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 箭头符号
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow\\
|
||||
&\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow\\
|
||||
&\leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow\\
|
||||
&\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup\\
|
||||
&\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
## 符号
|
||||
|
||||
$$
|
||||
\begin{align*}
|
||||
&\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup\\
|
||||
&\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle
|
||||
\end{align*}
|
||||
$$
|
||||
|
||||
*示例取自 [KaTeX Live Demo](https://sixthform.info/katex/examples/demo.html)*
|
Loading…
Add table
Add a link
Reference in a new issue