Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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. You can use some static one-liner.
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
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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.