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.
- Install docker and docker-compose.
- Run
cp docker-compose.dev.override.yml docker-compose.override.yml - Run
docker-compose build. - Run
docker-compose run --rm web npm install. - 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=<tex-string> or svg?tex=<tex-string>&scale=<scale-value>
where:
<tex-string>is the tex code for the equation<scale-value>is how much to scale the result. defaults to 1. only valid for svg.
- Run
docker-compose buildif you haven't already. - Run
cp docker-compose.dev.override.yml docker-compose.override.yml - Run
docker-compose run --rm web npm install. - Run
docker-compose run --rm web npm test.
- Run
docker-compose run --rm web npm install. - 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.