
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-autolatex
Advanced tools
Auto-render LaTeX in React.
Based on KaTeX. TypeScript declaration supported.
npm install react-autolatex
Normal:
import 'katex/dist/katex.min.css';
import AutoLaTeX from 'react-autolatex';
export default () => {
return (
<AutoLaTeX>{'LaTeX string or HTML rich text with LaTeX like $c = \\pm\\sqrt{a^2 + b^2}$'}</AutoLaTeX>
);
};
With TypeScript:
import 'katex/dist/katex.min.css';
import AutoLaTeX, { RenderMathInElementOptions } from 'react-autolatex';
export default () => {
const options: RenderMathInElementOptions = {
delimiters: [
{ left: '$$', right: '$$', display: true },
{ left: '$', right: '$', display: false },
],
errorCallback(msg: string, err: Error) {
console.error('[Error]', msg, err);
},
};
return (
<AutoLaTeX options={options}>{'LaTeX string or HTML rich text with LaTeX like $c = \\pm\\sqrt{a^2 + b^2}$'}</AutoLaTeX>
);
};
Note: You may need to handle XSS before passing string to AutoLaTeX.
| Name | Type | Default | Description |
|---|---|---|---|
| children | string, required | '' | The string content to render |
| options | RenderMathInElementOptions | *see below | Render options (doc) |
| className | string | '' | Class name for the container to render LaTeX |
| style | React.CSSProperties | {} | Style for the container to render LaTeX |
options default:
{
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "\\[", right: "\\]", display: true },
{ left: "$", right: "$", display: false },
{ left: "\\(", right: "\\)", display: false },
],
}
MIT
FAQs
Auto-render LaTeX in React
The npm package react-autolatex receives a total of 9 weekly downloads. As such, react-autolatex popularity was classified as not popular.
We found that react-autolatex 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.