Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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