Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/instructure/mathman
A simple lambda function that converts LaTeX formulae to MathML and SVG.
https://github.com/instructure/mathman
Last synced: 7 days ago
JSON representation
A simple lambda function that converts LaTeX formulae to MathML and SVG.
- Host: GitHub
- URL: https://github.com/instructure/mathman
- Owner: instructure
- Created: 2017-03-23T21:20:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-30T01:16:39.000Z (8 months ago)
- Last Synced: 2024-04-14T20:25:57.864Z (7 months ago)
- Language: JavaScript
- Size: 25.7 MB
- Stars: 11
- Watchers: 10
- Forks: 10
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MathMan by Instructure
## Introduction
This is a simple microservice that converts LaTeX formulae to MathML and SVG.
It can either be run locally via `docker-compose`, or on Amazon Lambda.## Quick start (for Docker)
1. Install docker and docker-compose.
2. Run `cp docker-compose.dev.override.yml docker-compose.override.yml`
3. Run `docker-compose build`.
4. Run `docker-compose run --rm web npm install`.
5. Run `docker-compose up`.This will launch the microservice, along with a Redis cache. The service
is available at `http://mathman.docker`.The API interface is `/mml?tex=` or `svg?tex=&scale=`
where:
- `` is the tex code for the equation
- `` is how much to scale the result. defaults to 1. only valid for svg.## Tests
1. Run `docker-compose build` if you haven't already.
2. Run `cp docker-compose.dev.override.yml docker-compose.override.yml`
3. Run `docker-compose run --rm web npm install`.
4. Run `docker-compose run --rm web npm test`.## Deploy
### Package the code for lambda
1. Run `docker-compose run --rm web npm install`.
2. Run `docker-compose run --rm web ./deploy/package $(git rev-parse --short HEAD)`.The result will be `build/lambda.zip` which can be uploaded to AWS as a
lambda function using the mathman-deploy deployer role.