{"library":"mathex2java-translator","title":"MaTheX2Java","description":"MaTheX2Java is a transpiler that converts amsmath LaTeX mathematical expressions into well-structured, executable Java code. The current stable version (1.1.6) supports the amsmath package v2.1 and provides an annotation feature for customizing code generation. It is built with ANTLR4 and ships TypeScript types. Unlike general LaTeX-to-code tools, MaTheX2Java focuses specifically on Java, producing production-ready code without requiring Java knowledge. Release cadence is irregular but active; the GitHub repository shows recent maintenance. It is for mathematicians, students, and developers who want to run LaTeX formulas as Java programs.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install mathex2java-translator"],"cli":{"name":"mathex2java","version":null}},"imports":["import { translate } from 'mathex2java-translator'","import { AnnotatedTranslation } from 'mathex2java-translator'","import maTheX2Java from 'mathex2java-translator'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { translate } from 'mathex2java-translator';\n\nconst latex = '\\\\[ \\\\int_{a}^{b} x^2 \\\\, dx \\\\]';\nconst javaCode = translate(latex, { annotations: [] });\nconsole.log(javaCode);\n// Output: public static double integrate(double a, double b) { double result = 0; for (double x = a; x <= b; x += 0.001) { result += x * x * 0.001; } return result; }","lang":"typescript","description":"Translates a LaTeX integral expression into a Java method using numerical integration.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}