forked from drowl87/hextra_mirror
feat: add mhchem support
This commit is contained in:
parent
8298278a42
commit
57f298256d
1
assets/vendor/katex/mhchem.min.js
vendored
Normal file
1
assets/vendor/katex/mhchem.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -42,3 +42,17 @@ $$F(\omega) = \int_{-\infty}^{\infty} f(t) e^{-j\omega t} \, dt$$
|
||||
## Supported Functions
|
||||
|
||||
For a list of supported functions, see [KaTeX supported functions](https://katex.org/docs/supported.html).
|
||||
|
||||
## Chemistry
|
||||
|
||||
Chemistry expressions are supported via [mhchem](https://mhchem.github.io/MathJax-mhchem/) extension.
|
||||
|
||||
Inline: $\ce{H2O}$ is water.
|
||||
|
||||
Separate paragraph:
|
||||
|
||||
```markdown {filename="page.md"}
|
||||
$$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$$
|
||||
```
|
||||
|
||||
$$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$$
|
||||
|
@ -40,10 +40,12 @@
|
||||
{{- if and (not site.Params.math.disabled) .Page.Params.math -}}
|
||||
{{- $katexCSS := resources.Get "vendor/katex/katex.min.css" | fingerprint -}}
|
||||
{{- $katexJS := resources.Get "vendor/katex/katex.min.js" | fingerprint -}}
|
||||
{{- $mhchemJS := resources.Get "vendor/katex/mhchem.min.js" | fingerprint -}}
|
||||
{{- $katexAutoRenderJS := resources.Get "vendor/katex/auto-render.min.js" | fingerprint -}}
|
||||
<link type="text/css" rel="stylesheet" href="{{ $katexCSS.RelPermalink }}" integrity="{{ $katexCSS.Data.Integrity }}" />
|
||||
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $katexAutoRenderJS.RelPermalink }}" integrity="{{ $katexAutoRenderJS.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $mhchemJS.RelPermalink }}" integrity="{{ $mhchemJS.Data.Integrity }}"></script>
|
||||
{{ $katexFonts := resources.Match "vendor/katex/fonts/*" }}
|
||||
{{- range $katexFonts -}}
|
||||
{{ .Publish }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user