Gathering detailed insights and metrics for @iktakahiro/markdown-it-katex
Gathering detailed insights and metrics for @iktakahiro/markdown-it-katex
npm install @iktakahiro/markdown-it-katex
Typescript
Module System
Node Version
NPM Version
JavaScript (87.44%)
HTML (12.56%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,664,958
Last Day
3,235
Last Week
19,249
Last Month
78,442
Last Year
787,818
NOASSERTION License
76 Stars
98 Commits
34 Forks
5 Watchers
5 Branches
1 Contributors
Updated on Jan 22, 2025
Minified
Minified + Gzipped
Latest Version
4.0.1
Package Id
@iktakahiro/markdown-it-katex@4.0.1
Size
6.83 kB
NPM Version
6.14.5
Node Version
10.15.3
Published on
Oct 15, 2020
Cumulative downloads
Total Downloads
Last Day
-15%
3,235
Compared to previous day
Last Week
4.2%
19,249
Compared to previous week
Last Month
3.6%
78,442
Compared to previous month
Last Year
109.6%
787,818
Compared to previous year
1
3
Add Math to your Markdown
KaTeX is a faster alternative to MathJax. This plugin makes it easy to support in your markdown.
Need convincing?
Install markdown-it
1npm install markdown-it
Install the plugin
1npm install @iktakahiro/markdown-it-katex
Use it in your javascript
1var md = require('markdown-it')(), 2 mk = require('@iktakahiro/markdown-it-katex'); 3 4md.use(mk); 5 6// double backslash is required for javascript strings, but not html input 7var result = md.render('# Math Rulez! \n $\\sqrt{3x-1}+(1+x)^2$');
Include the KaTeX stylesheet in your html:
1<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css">
If you're using the default markdown-it parser, I also recommend the github stylesheet:
1<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css"/>
KaTeX
options can be supplied with the second argument to use.
1md.use(mk, {"throwOnError" : false, "errorColor" : " #cc0000"});
Surround your LaTeX with a single $
on each side for inline rendering.
1$\sqrt{3x-1}+(1+x)^2$
Use two ($$
) for block rendering. This mode uses bigger symbols and centers
the result.
1$$\begin{array}{c} 2 3\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & 4= \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ 5 6\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ 7 8\nabla \cdot \vec{\mathbf{B}} & = 0 9 10\end{array}$$
Math parsing in markdown is designed to agree with the conventions set by pandoc:
Anything between two $ characters will be treated as TeX math. The opening $ must
have a non-space character immediately to its right, while the closing $ must
have a non-space character immediately to its left, and must not be followed
immediately by a digit. Thus, $20,000 and $30,000 won’t parse as math. If for some
reason you need to enclose text in literal $ characters, backslash-escape them and
they won’t be treated as math delimiters.
KaTeX is based on TeX and LaTeX. Support for both is growing. Here's a list of currently supported functions:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 4/13 approved changesets -- score normalized to 3
Reason
8 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 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
security policy file not detected
Details
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-03-10
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