Skip to content

remarkablemark/texsvg-server

Repository files navigation

texsvg-server

Run on Replit

Build Status Coverage Status GitHub last commit

Web API that converts TeX to SVG.

Built with:

Example

Quadratic Formula:

/?tex=x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

x equals begin fraction negative b plus or minus begin square root b squared minus 4 times a times c end square root over 2 times a end fraction

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 the TeX.

Replit | JSFiddle

Prerequisites

Installation

Clone the repository:

git clone https://github.com/remarkablemark/texsvg-server.git
cd texsvg-server

Install the dependencies:

npm install

Scripts

In the project directory, you can run:

npm start

Runs the server in production mode using PM2.

npm run dev

Runs the server in development mode.

Open 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