Gathering detailed insights and metrics for rehype-mathjax-dumi-tmp
Gathering detailed insights and metrics for rehype-mathjax-dumi-tmp
Gathering detailed insights and metrics for rehype-mathjax-dumi-tmp
Gathering detailed insights and metrics for rehype-mathjax-dumi-tmp
npm install rehype-mathjax-dumi-tmp
Typescript
Module System
Node Version
NPM Version
rehype-mathjax@7.1.0
Updated on Feb 20, 2025
rehype-mathjax@7.0.0
Updated on Feb 12, 2025
rehype-katex@7.0.1
Updated on Aug 19, 2024
rehype-mathjax@6.0.0
Updated on Dec 21, 2023
rehype-mathjax@5.0.0
Updated on Sep 19, 2023
rehype-katex@7.0.0
Updated on Sep 19, 2023
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
446 Stars
288 Commits
66 Forks
9 Watchers
1 Branches
30 Contributors
Updated on Jul 11, 2025
Latest Version
3.1.1-0
Package Id
rehype-mathjax-dumi-tmp@3.1.1-0
Unpacked Size
22.50 kB
Size
7.81 kB
File Count
16
NPM Version
7.4.0
Node Version
15.6.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This project is a monorepo that contains several packages for dealing with math in markdown and HTML.
This repository contains unified (rehype and remark) plugins to add support for math. You can use them to add support for parsing and serializing a syntax extension and to render math with KaTeX or MathJax.
remark-math
— remark plugin to support a math syntax in markdownrehype-katex
— rehype plugin to render math in HTML with KaTeXrehype-mathjax
— rehype plugin to render math in HTML with MathJaxWhen dealing with markdown, you optionally use remark-math
, or alternatively
use fenced code (```math
).
Then, you either use rehype-katex
or rehype-mathjax
to render math in HTML.
There are also other plugins that work with remark-math
.
Such as rehype-mathml
which uses ronkok/Temml
.
This project is useful when you want to support LaTeX math.
This mechanism works well when you want authors, that have some LaTeX
experience, to be able to embed rich diagrams of math to scientific
documentation.
The extra syntax extension supported by remark-math
for math in markdown does
not work everywhere so it makes markdown less portable.
This project is also useful as it renders math with KaTeX or MathJax at compile
time, which means that there is no client side JavaScript needed.
Say our document example.md
contains:
1Lift($$L$$) can be determined by Lift Coefficient ($$C_L$$) like the following 2equation. 3 4$$ 5L = \frac{1}{2} \rho v^2 S C_L 6$$
…and our module example.js
contains:
1import rehypeKatex from 'rehype-katex' 2import rehypeStringify from 'rehype-stringify' 3import remarkMath from 'remark-math' 4import remarkParse from 'remark-parse' 5import remarkRehype from 'remark-rehype' 6import {read} from 'to-vfile' 7import {unified} from 'unified' 8 9const file = await unified() 10 .use(remarkParse) 11 .use(remarkMath) 12 .use(remarkRehype) 13 .use(rehypeKatex) 14 .use(rehypeStringify) 15 .process(await read('example.md')) 16 17console.log(String(file))
…then running node example.js
yields:
1<p>Lift(<code class="language-math math-inline"><span class="katex">…</span></code>) like the following 2equation.</p> 3<pre><code class="language-math math-display"><span class="katex-display"><span class="katex">…</span></span></code></pre>
👉 Note: KaTeX requires CSS to render correctly. Use
katex.css
somewhere on the page where the math is shown to style it properly:1<!-- Get the latest one from: https://katex.org/docs/browser --> 2<link href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" rel="stylesheet">
Supporting either MathJax or KaTeX is very similar. Take the above KaTeX example and change:
1@@ -1,4 +1,4 @@ 2-import rehypeKatex from 'rehype-katex' 3+import rehypeMathjax from 'rehype-mathjax' 4 import rehypeStringify from 'rehype-stringify' 5 import remarkMath from 'remark-math' 6 import remarkParse from 'remark-parse' 7@@ -10,7 +10,7 @@ const file = await unified() 8 .use(remarkParse) 9 .use(remarkMath) 10 .use(remarkRehype) 11- .use(rehypeKatex) 12+ .use(rehypeMathjax) 13 .use(rehypeStringify) 14 .process(await read('example.md'))
…then running node example.js
yields:
1<p>Lift(<mjx-container class="MathJax" jax="SVG"><!--…--></mjx-container>) can be determined by Lift Coefficient (<mjx-container class="MathJax" jax="SVG"><!--…--></mjx-container>) like the following 2equation.</p> 3<mjx-container class="MathJax" jax="SVG" display="true"><!--…--></mjx-container><style> 4mjx-container[jax="SVG"] { 5 direction: ltr; 6} 7/* … */ 8</style>
Assuming you trust KaTeX/MathJax, using rehype-katex
/rehype-mathjax
is
safe.
If a vulnerability is introduced in them, it opens you up to a
cross-site scripting (XSS) attack.
See their readmes for more info.
See contributing.md
in remarkjs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
MIT © Junyoung Choi and Taniguchi Masaya
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 3/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More