{"library":"escape-latex","type":"library","category":null,"description":"escape-latex is a JavaScript utility for sanitizing strings by escaping LaTeX special characters, making them safe for inclusion in LaTeX documents. The current stable version is 1.2.0. As a focused utility, it typically has an infrequent release cadence, with updates primarily for bug fixes or minor enhancements. Its key differentiators include the ability to selectively escape characters that would simply malform LaTeX (`# $ % & \\ ^ _ { }`) versus those that affect formatting (spaces, en-dashes, em-dashes) via the `preserveFormatting` option. Furthermore, it provides an `escapeMapFn` callback, allowing developers to fully customize or extend the character-to-escape mapping based on specific LaTeX requirements, offering flexibility beyond standard escaping mechanisms. It is designed for use in Node.js environments.","language":"javascript","status":"active","version":"1.2.0","tags":["javascript","latex","escape"],"last_verified":"Wed May 27","install":[{"cmd":"npm install escape-latex","imports":["import lescape from 'escape-latex';","const lescape = require('escape-latex');","lescape(input, { preserveFormatting: true });"]},{"cmd":"yarn add escape-latex","imports":[]},{"cmd":"pnpm add escape-latex","imports":[]}],"homepage":null,"github":"https://github.com/dangmai/escape-latex","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/escape-latex","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/escape-latex/compatibility"}}