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.
npm install mathex2java-translatorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Translates a LaTeX integral expression into a Java method using numerical integration.
Use only amsmath v2.1 compatible LaTeX. Avoid LaTeX3 or non-amsmath packages.
Use import syntax or dynamic import(). If using CommonJS, upgrade to ESM or use a wrapper.
Override step size via annotations or post-process the generated code.
Convert your project to ESM (set type: module in package.json) or use dynamic import: const { translate } = await import('mathex2java-translator');Ensure Node.js version >= 12 and set type: module in package.json, or transpile with Babel/TypeScript.
Use import { translate } from 'mathex2java-translator' instead of import maTheX2Java from 'mathex2java-translator'.No dependency data recorded yet.