Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saadq/sanitize-latex
A string sanitizer for LaTeX symbols.
https://github.com/saadq/sanitize-latex
latex nodejs sanitizer
Last synced: 16 days ago
JSON representation
A string sanitizer for LaTeX symbols.
- Host: GitHub
- URL: https://github.com/saadq/sanitize-latex
- Owner: saadq
- License: mit
- Created: 2017-05-06T07:58:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-06T08:03:47.000Z (over 7 years ago)
- Last Synced: 2024-12-09T12:58:04.535Z (24 days ago)
- Topics: latex, nodejs, sanitizer
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/sanitize-latex
- Size: 35.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# sanitize-latex
Sanitize hazardous LaTeX symbols from your strings.## Install
```
npm install sanitize-latex
```## Usage
```js
const sanitize = require('sanitize-latex')const unsanitizedString = '\\ ${Hello} %there^'
const sanitizedString = sanitize(unsanitizedString)console.log(sanitizedString) // \textbackslash{} \$\{Hello\} \%there\textasciicircum{}
```## API
### sanitize(str)
#### str {String}
The LaTeX string to be normalized.## License
MIT