Skip to content

andstor/maxima-codegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

maxima-codegen

Maxima code generator from latex-math-parser AST.

This code generator takes LaTeX math expressions and converts them into Maxima syntax through an abstract syntax tree (AST) representation. It works with @andstor/latex-math-parser to provide seamless conversion from LaTeX to Maxima code.

Maxima is a computer algebra system (CAS) that can manipulate symbolic and numerical expressions.

Installation

npm install @andstor/maxima-codegen

To create the AST, you will also need to install the LaTeX math parser:

npm install @andstor/latex-math-parser

Usage

const { parse } = require('@andstor/latex-math-parser');
const { generate } = require('@andstor/maxima-codegen');

const latex = '\\frac{a}{b} + \\sqrt{x}';
const ast = parse(latex);
const maximaCode = generate(ast);

console.log(maximaCode); // Output: a/b + sqrt(x)

About

๐Ÿ“ Maxima code generator from LaTeX math AST.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors