TeX2Max is a JavaScript library for converting LaTeX math to Maxima code.
TeX2Max supports Node and AMD, in addition to normal browser support.
lib/
├── tex2max.amd.js (AMD)
├── tex2max.js (UMD)
└── tex2max.common.js (CommonJS, default)
npm install tex2max
In browser:
<script src="/path/to/tex2max.js"></script>
The unpkg provides CDN support for tex2max.js's JavaScript. You can find the links here.
Alternativeley, you can download the latest standalone JavaScript files (ES5)
new tex2max(options)
- options (optional)
- Type: Object
- The options for the converter. Check out the available options.
const TeX2Max = require('tex2max');
const converter = new TeX2Max(options);
define(['./path/to/tex2max.amd'], function(TeX2Max) {
const converter = new TeX2Max(options);
});
const TeX2Max = window.tex2max;
const converter = new TeX2Max(options);
The TeX2Max class also support multiple optional configurations. These should be passed as an object to the TeX2Max class object. If no manual configurations are set, default options are used.
- Type:
Boolean
- Default:
false
Enable to only allow single variable names.
- Type:
Boolean
- Default:
false
Enable to let Maxima solve an algebraic equation.
- Type:
Boolean
- Default:
true
Add multiplication sign where multiplication is implied.
- Type:
Boolean
- Default:
false
Enable to disallow decimal point separators .
in numbers.
- Type:
Boolean
- Default:
false
Enable to disallow decimal comma separators ,
in numbers.
- Type:
Boolean
- Default:
false
Enable to convert all greek letters to names.
- Type:
Boolean
- Default:
false
Enable to convert all greek letters to symbols.
- Type:
Boolean
- Default:
false
Enable to produce debugging info.
-
latex:
- Type:
String
- LaTeX math string.
- Type:
-
(return value):
- Type:
String
- Maxima code string.
- Type:
Convert LaTeX math into Maxima code.
- options (optional):
Update the converter options.
Note: This resets all settings. If one or more settings passed as parameter are missing, defaults will be used.
Get the latest latex input.
Get the latest conversion result.
Clone a copy of the main TeX2Max git repo by running:
git clone git://github.com/KQMATH/tex2max.git
Enter the TeX2Max directory and run the build script:
npm run build
Project lead: Hans Georg Schaathun hasc@ntnu.no
Developer: André Storhaug andr3.storhaug@gmail.com
TeX2Max is Licensed under the GNU General Public, License Version 3.