Giter Club home page Giter Club logo

math-rendering's Introduction

Math rendering

A small library for rendering expressions into different formats. Currently supported are:

  • Inline unicode string
  • Ascii art
  • Unicode ascii art
  • Latex source code
  • MathML

Additionally, options to render to these formats is planned:

  • Rendering as an image

The library does not support parsing math expressions from LaTeX or similar, it is mainly intended for displaying math which is already given in "program format".

Example output

def(name("A"), matrix(2, 2, not(par(and(num(1), num(0)))), frac(pi(),num(2)), call("exp", num(2), num(3)), neg(factorial(num(4)))))

Unicode ascii art:

     ⎡          π ⎤
     ⎢ ¬(1∧0)   - ⎥
A := ⎢          2 ⎥
     ⎣exp(2,3) -4!⎦

set(eq(sum(eq(name("k"), num(0)), inf(), frac(num(1), pow(name("q"), num("k")))), frac(num(1), minus(num(1), name("k")))), nIn(name("q"), par(list(num(0), num(1)))))

Ascii art:

/ oo            |             \
| __   1     1  |    __/      |
< \  ---- = --- |   /_/       >
| /_   k    1-k | q \/_ (0,1) |
\ k=0 q         |   /         /

math-rendering's People

Contributors

rc-cookie 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.