Skip to content

Commit c16177b

Browse files
committed
docs: introduce KaTeX local copy plugin & Temml for math
1 parent 730ce48 commit c16177b

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

website/docs/guides/markdown-features/markdown-features-math-equations.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,24 @@ export default {
202202
],
203203
};
204204
```
205+
206+
You can use the third-party [@tats-u/docusaurus-plugin-copy-katex-assets](https://github.com/tats-u/docusarusu-copy-katex-assets) plugin to copy the `katex.min.css` and `fonts` directory to your site's `assets` directory.
207+
208+
### MathML or Temml instead of KaTeX {#mathml}
209+
210+
You can use the [`@daiji256/rehype-mathml`](https://www.npmjs.com/package/@daiji256/rehype-mathml) plugin instead of `rehype-katex`:
211+
212+
- When you want to use another math font other than Latin Modern Math
213+
- When you want to reduce the download size to a minimum by compromising with local fonts
214+
- When you want to reduce the number of files to be served
215+
- When you want to use $LaTeX$ syntax available not in KaTeX but in Temml
216+
217+
After installing and activating the plugin, [put Temml assets](https://temml.org/docs/en/administration) in your site's `static` directory, and replace the stylesheet's `href` from the CDN URL of `katex.min.css` to your local path of the Temml CSS (say, `/temml/temml.min.css`) in `docusaurus.config.js`.
218+
219+
You can use the third-party [@tats-u/docuaurus-plugin-copy-temml-assets](https://github.com/tats-u/docusaurus-copy-temml-assets) plugin to copy the Temml assets to your site's `assets` directory.
220+
221+
:::note
222+
223+
Temml recommends the Latin Modern font for better display, but its WOFF2 font file is larger than the entire KaTeX font bundle. Unless you prefer fonts other than Latin Modern (e.g. local fonts or [Noto Sans Math](https://fonts.google.com/noto/specimen/Noto+Sans+Math)) or the compliance to the standards, or need the support of TeX features supported only by Temml, KaTeX is the better choice.
224+
225+
:::

website/versioned_docs/version-3.6.3/guides/markdown-features/markdown-features-math-equations.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,24 @@ export default {
200200
],
201201
};
202202
```
203+
204+
You can use the third-party [@tats-u/docusaurus-plugin-copy-katex-assets](https://github.com/tats-u/docusarusu-copy-katex-assets) plugin to copy the `katex.min.css` and `fonts` directory to your site's `assets` directory.
205+
206+
### MathML or Temml instead of KaTeX {#mathml}
207+
208+
You can use the [`@daiji256/rehype-mathml`](https://www.npmjs.com/package/@daiji256/rehype-mathml) plugin instead of `rehype-katex`:
209+
210+
- When you want to use another math font other than Latin Modern Math
211+
- When you want to reduce the download size to a minimum by compromising with local fonts
212+
- When you want to reduce the number of files to be served
213+
- When you want to use $LaTeX$ syntax available not in KaTeX but in Temml
214+
215+
After installing and activating the plugin, [put Temml assets](https://temml.org/docs/en/administration) in your site's `static` directory, and replace the stylesheet's `href` from the CDN URL of `katex.min.css` to your local path of the Temml CSS (say, `/temml/temml.min.css`) in `docusaurus.config.js`.
216+
217+
You can use the third-party [@tats-u/docuaurus-plugin-copy-temml-assets](https://github.com/tats-u/docusaurus-copy-temml-assets) plugin to copy the Temml assets to your site's `assets` directory.
218+
219+
:::note
220+
221+
Temml recommends the Latin Modern font for better display, but its WOFF2 font file is larger than the entire KaTeX font bundle. Unless you prefer fonts other than Latin Modern (e.g. local fonts or [Noto Sans Math](https://fonts.google.com/noto/specimen/Noto+Sans+Math)) or the compliance to the standards, or need the support of TeX features supported only by Temml, KaTeX is the better choice.
222+
223+
:::

website/versioned_docs/version-3.7.0/guides/markdown-features/markdown-features-math-equations.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,24 @@ export default {
200200
],
201201
};
202202
```
203+
204+
You can use the third-party [@tats-u/docusaurus-plugin-copy-katex-assets](https://github.com/tats-u/docusarusu-copy-katex-assets) plugin to copy the `katex.min.css` and `fonts` directory to your site's `assets` directory.
205+
206+
### MathML or Temml instead of KaTeX {#mathml}
207+
208+
You can use the [`@daiji256/rehype-mathml`](https://www.npmjs.com/package/@daiji256/rehype-mathml) plugin instead of `rehype-katex`:
209+
210+
- When you want to use another math font other than Latin Modern Math
211+
- When you want to reduce the download size to a minimum by compromising with local fonts
212+
- When you want to reduce the number of files to be served
213+
- When you want to use $LaTeX$ syntax available not in KaTeX but in Temml
214+
215+
After installing and activating the plugin, [put Temml assets](https://temml.org/docs/en/administration) in your site's `static` directory, and replace the stylesheet's `href` from the CDN URL of `katex.min.css` to your local path of the Temml CSS (say, `/temml/temml.min.css`) in `docusaurus.config.js`.
216+
217+
You can use the third-party [@tats-u/docuaurus-plugin-copy-temml-assets](https://github.com/tats-u/docusaurus-copy-temml-assets) plugin to copy the Temml assets to your site's `assets` directory.
218+
219+
:::note
220+
221+
Temml recommends the Latin Modern font for better display, but its WOFF2 font file is larger than the entire KaTeX font bundle. Unless you prefer fonts other than Latin Modern (e.g. local fonts or [Noto Sans Math](https://fonts.google.com/noto/specimen/Noto+Sans+Math)) or the compliance to the standards, or need the support of TeX features supported only by Temml, KaTeX is the better choice.
222+
223+
:::

0 commit comments

Comments
 (0)