https://github.com/remarkablemark/texsvg-server
:triangular_ruler: TeX to SVG API
https://github.com/remarkablemark/texsvg-server
api equation express formula javascript latex math mathjax nodejs svg tex
Last synced: about 2 months ago
JSON representation
:triangular_ruler: TeX to SVG API
- Host: GitHub
- URL: https://github.com/remarkablemark/texsvg-server
- Owner: remarkablemark
- License: mit
- Created: 2020-05-02T23:56:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T01:17:07.000Z (over 3 years ago)
- Last Synced: 2025-04-08T12:50:21.464Z (about 1 year ago)
- Topics: api, equation, express, formula, javascript, latex, math, mathjax, nodejs, svg, tex
- Language: JavaScript
- Homepage: https://texsvg-server.remarkablemark.repl.co
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# texsvg-server
[](https://replit.com/github/remarkablemark/texsvg-server)
[](https://travis-ci.org/remarkablemark/texsvg-server)
[](https://coveralls.io/github/remarkablemark/texsvg-server?branch=master)

Web API that converts [TeX](https://en.wikipedia.org/wiki/TeX) to [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics).
Built with:
- [Node.js](https://nodejs.org/en/)
- [Express](https://expressjs.com/)
- [texsvg](https://www.npmjs.com/package/texsvg)
### Example
Quadratic Formula:
```
/?tex=x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
```

See https://texsvg-server-github.remarkablemark.repl.co/?tex=x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
> To ensure the SVG renders correctly, [URI encode](https://meyerweb.com/eric/tools/dencoder/) the TeX.
[Replit](https://replit.com/@remarkablemark/texsvg-server-GitHub) | [JSFiddle](https://jsfiddle.net/remarkablemark/1k7t6s9o/)
## Prerequisites
- [Node.js](https://nodejs.org/en/)
- [npm](https://www.npmjs.com/get-npm)
## Installation
Clone the repository:
```sh
git clone https://github.com/remarkablemark/texsvg-server.git
cd texsvg-server
```
Install the dependencies:
```sh
npm install
```
## Scripts
In the project directory, you can run:
### `npm start`
Runs the server in **production** mode using [PM2](https://github.com/Unitech/pm2).
### `npm run dev`
Runs the server in **development** mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The server will restart if you make edits.
### `npm test`
Runs integration tests.
### `npm run test:watch`
Runs integration tests in watch mode.
### `npm run release`
Generates a release.
## License
[MIT](LICENSE)