
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Convert TeX to SVG using MathJax and SVGO:
texsvg(string)
CLI:
npx texsvg '\frac{a}{b}' fraction.svg
Script:
const texsvg = require('texsvg');
texsvg('\\frac{a}{b}').then((svg) => console.log(svg));
NPM:
npm install texsvg
Yarn:
yarn add texsvg
NPM:
npm install --global texsvg
Yarn:
yarn global add texsvg
NPX:
npx texsvg
Import with ES Modules:
import texsvg from 'texsvg';
Or require with CommonJS:
const texsvg = require('texsvg');
Convert TeX to SVG using async-await:
const quadraticFormula = 'x=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}';
(async () => {
try {
const svg = await texsvg(quadraticFormula);
console.log(svg);
} catch (err) {
console.error(err);
}
})();
Convert TeX to SVG using Promise:
const quadraticFormula = 'x=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}';
texsvg(quadraticFormula)
.then((svg) => console.log(svg))
.catch((err) => console.error(err));
Convert TeX to SVG without optimization:
texsvg('8', { optimize: false });
Usage:
texsvg <tex> <file>
Convert TeX to SVG and log result to console:
texsvg '\frac{a}{b}'
Convert TeX to SVG without optimization:
texsvg '\frac{a}{b}' --optimize=false
Convert TeX to SVG and save result to file:
texsvg '\frac{a}{b}' fraction.svg
Run tests with coverage:
npm test
Run tests in watch mode:
npm run test:watch
Lint files:
npm run lint
npm run lint:tsc
Fix lint errors:
npm run lint:fix
Release is automated with Release Please.
FAQs
Converts TeX to SVG.
The npm package texsvg receives a total of 359 weekly downloads. As such, texsvg popularity was classified as not popular.
We found that texsvg demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.