GithubHelp home page GithubHelp logo

classicvalues / mathman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from instructure/mathman

1.0 1.0 0.0 26.23 MB

A simple lambda function that converts LaTeX formulae to MathML and SVG.

JavaScript 96.33% Shell 2.61% Dockerfile 1.06%

mathman's Introduction

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=<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.

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.

mathman's People

Contributors

brentropy avatar eschiebel avatar grahamb avatar simonista avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.