Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
react-katex
Advanced tools
Display math with KaTeX and ReactJS !
You can install it with npm:
$ npm install react-katex
With Bower:
$ bower install react-katex
Or use one of the files inside the dist
folder.
When using react-katex
, don't forget to import KaTeX CSS file (see example/index.html
).
If you open the example file on Firefox directly (i.e. without a server) the fonts won't load, open it on Chrome or put it on some server, like simplehttpserver.
react-katex
has two types of math components, InlineMath
and BlockMath
.
Let's you display math in the middle of the text.
var InlineMath = ReactKaTeX.InlineMath;
React.render(<InlineMath math="\\int_0^\\infty x^2 dx"/>,
document.getElementById('math'));
// or
React.render(<InlineMath>\int_0^\infty x^2 dx</InlineMath>,
document.getElementById('math'));
It will be rendered like this:
Let's you display math in a separated block, with larger font and symbols.
var BlockMath = ReactKaTeX.BlockMath;
React.render(<BlockMath math="\\int_0^\\infty x^2 dx"/>,
document.getElementById('math'));
// or
React.render(<BlockMath>\int_0^\infty x^2 dx</BlockMath>,
document.getElementById('math'));
It will be rendered like this:
FAQs
Display math in TeX with KaTeX and ReactJS
The npm package react-katex receives a total of 19,536 weekly downloads. As such, react-katex popularity was classified as popular.
We found that react-katex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.