https://github.com/sans-script/mathdeli2dollar
mathdeli2dollar is a simple library to convert LaTeX math delimiters to dollar signs. It transforms LaTeX mathematical expressions wrapped in \[ ... \] and \( ... \) into $$ ... $$ and $ ... $, respectively.
https://github.com/sans-script/mathdeli2dollar
convert latex markdown math
Last synced: 4 months ago
JSON representation
mathdeli2dollar is a simple library to convert LaTeX math delimiters to dollar signs. It transforms LaTeX mathematical expressions wrapped in \[ ... \] and \( ... \) into $$ ... $$ and $ ... $, respectively.
- Host: GitHub
- URL: https://github.com/sans-script/mathdeli2dollar
- Owner: sans-script
- Created: 2025-02-19T17:25:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-26T14:03:14.000Z (over 1 year ago)
- Last Synced: 2025-10-09T01:08:53.843Z (8 months ago)
- Topics: convert, latex, markdown, math
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/mathdeli2dollar
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mathdeli2dollar
`mathdeli2dollar` is a simple library to convert LaTeX math delimiters to dollar signs. It transforms LaTeX mathematical expressions wrapped in `\[ ... \]` and `\( ... \)` into `$$ ... $$` and `$ ... $`, respectively.
## Installation
You can install the package via npm:
```bash
npm install mathdeli2dollar
```
## Usage
### Example
Import the `mathdeli2dollar` function and pass a string containing LaTeX expressions:
```javascript
import mathdeli2dollar from "mathdeli2dollar";
const text = "Example: \\(x^2 + y^2 = z^2\\)";
console.log(mathdeli2dollar(text));
```
### Expected Output
The function will convert the input and return the text with the delimiters changed:
```plaintext
Example: $x^2 + y^2 = z^2$
```
## Contributing
If you find any bugs or would like to add new features, feel free to **open an issue** or **submit a pull request**.
### Contribution Steps
1. Fork the repository.
2. Create a new branch for your feature.
3. Make your changes and ensure everything works correctly.
4. Commit your changes following [semantic commit conventions](https://www.conventionalcommits.org/en/v1.0.0/).
5. Open a Pull Request with a detailed description of the changes.