sanitize-latex
Sanitize hazardous LaTeX symbols from your strings.
Install
npm install sanitize-latex
Usage
const sanitize = const unsanitizedString = '\\ ${Hello} %there^'const sanitizedString = console // \textbackslash{} \$\{Hello\} \%there\textasciicircum{}
API
sanitize(str)
str {String}
The LaTeX string to be normalized.
License
MIT