@kawapress/plugin-mathjax
v0.8.3
Published
Build-time MathJax rendering for KawaPress
Readme
@kawapress/plugin-mathjax
Build-time MathJax rendering for KawaPress. Math becomes SVG, so readers download no MathJax.
· 简体中文
@kawapress/plugin-mathjax is part of KawaPress, a Vue-first static site generator.
Features
- Renders
$…$inline and$$…$$block math as SVG during the build. - The browser never downloads or runs MathJax.
- Supports a broad set of TeX packages, including
ams,mhchem,physics,cancelandbraket. - Define your own TeX macros in the configuration.
Install
npm install --save-dev @kawapress/plugin-mathjaxpnpm add --save-dev @kawapress/plugin-mathjax and yarn add --dev @kawapress/plugin-mathjax work too.
Usage
import mathjaxPlugin from '@kawapress/plugin-mathjax'
import { nagi } from 'kawapress/nagi'
export default nagi({
plugins: [mathjaxPlugin()],
})Mass-energy equivalence is $E = mc^2$.
$$
\int_0^1 x^2 \, dx = \frac{1}{3}
$$Options
| Option | Description |
| --- | --- |
| tex | MathJax TeX input options. tex.macros defines your own macros. |
| svg | MathJax SVG output options, such as scale and minScale. |
Documentation
Documentation · Report a problem
License
MIT © KawaPress contributors
