Gathering detailed insights and metrics for notebookjs-katex
Gathering detailed insights and metrics for notebookjs-katex
Gathering detailed insights and metrics for notebookjs-katex
Gathering detailed insights and metrics for notebookjs-katex
Filter for IPython source files that converts $..$ and $$..$$ blocks in Markdown cells into KaTeX math HTML.
npm install notebookjs-katex
Typescript
Module System
Node Version
NPM Version
58.7
Supply Chain
82.7
Quality
74.6
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
2 Stars
29 Commits
1 Forks
3 Watching
1 Branches
1 Contributors
Latest Version
1.1.0
Package Id
notebookjs-katex@1.1.0
Unpacked Size
21.52 kB
Size
5.56 kB
File Count
8
NPM Version
8.1.4
Node Version
17.2.0
Cumulative downloads
Total Downloads
Last day
0%
0
Compared to previous day
Last week
0%
0
Compared to previous week
Last month
0%
0
Compared to previous month
Last year
0%
0
Compared to previous year
IPython
Markdown cells can format
LaTeX math expressions between $...$
(inline) or
$$...$$
(block) delimiters. This works great when editing and viewing within a
Jupyter process. However, when converting the source *.ipynb
file
to HTML using the otherwise excellent notebookjs package the math
expressions do not appear -- notebookjs
does not currently support expansion of $...$
and $$...$$
expressions into math HTML renderings.
NOTE: currently the delimiters are hard–coded. Customizing this is work for a future release.
This NPM package provides a simple filter for IPython
source which when run before
notebookjs
's render
process will properly generate inline and block math HTML expressions using the
KaTeX package. I use this to perform server-side math expression rendering for
my blog, Keystroke Countdown.
Install this package using npm
:
1% npm install [-s] notebookjs-katex
Assuming you already have notebookjs
installed, one way for using this would like so, just prior to using
notebookjs
to parse and render HTML:
1var KatexFilter = require("notebookjs-katex"); 2var kf = new KatexFilter(); 3 4var ipynb = JSON.parse(fs.readFileSync('/path/to/notebook.ipynb')); 5kf.expandKatexInNotebook(ipynb); 6 7var notebook = notebookjs.parse(ipynb); 8var html = notebook.render().outerHTML;
The KatexFilter
constructor takes an optional configuration object which will be given to the KaTeX render
method. See the docs for details. Note that KatexFilter
always sets throwOnError
to false
, and displayMode
will be set depending on the delimiters surrounding the
math expression.
There are a set of Vows in index.test.js. To run:
1% npm test
NOTE: if this fails, there may be a path issue with
vows
executable. See package.json.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 0/27 approved changesets -- score normalized to 0
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
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 2024-12-23
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