LaTeX to CAS translator
This mockup demonstrates the concept of TeX to Computer Algebra System (CAS) conversion.
The demo-application converts LaTeX functions which directly translate to CAS counterparts.
Functions without explicit CAS support are available for translation via a DRMF package (under development).
The following LaTeX input ...
{\displaystyle \Re(a)>0. }
... is translated to the CAS output ...
Semantic latex: \realpart(a)>0
Confidence: 0
Mathematica
Translation: Re[(a) ] > 0
Information
Sub Equations
- Re[(a) ] > 0
Free variables
- a
Symbol info
- Real part of a complex number; Example: \realpart@@{z}
Will be translated to: Re[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E2 Mathematica: https://reference.wolfram.com/language/ref/Re.html
Tests
Symbolic
Test expression: Re[(a) ]>0
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \realpart [\realpart]
Tests
Symbolic
Numeric
Maple
Translation: Re((a) ) > 0
Information
Sub Equations
- Re((a) ) > 0
Free variables
- a
Symbol info
- Real part of a complex number; Example: \realpart@@{z}
Will be translated to: Re($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Re
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_894ac5276bb7e5b29f66469faac4e37c",
"formula" : "\\realpart(a)>0",
"semanticFormula" : "\\realpart(a)>0",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "Re[(a) ] > 0",
"translationInformation" : {
"subEquations" : [ "Re[(a) ] > 0" ],
"freeVariables" : [ "a" ],
"tokenTranslations" : {
"\\realpart" : "Real part of a complex number; Example: \\realpart@@{z}\nWill be translated to: Re[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.9#E2\nMathematica: https://reference.wolfram.com/language/ref/Re.html"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "ERROR",
"numberOfTests" : 1,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 1,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "Re[(a) ]",
"rhs" : "0",
"testExpression" : "Re[(a) ]>0",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\realpart [\\realpart]"
}
}
},
"Maple" : {
"translation" : "Re((a) ) > 0",
"translationInformation" : {
"subEquations" : [ "Re((a) ) > 0" ],
"freeVariables" : [ "a" ],
"tokenTranslations" : {
"\\realpart" : "Real part of a complex number; Example: \\realpart@@{z}\nWill be translated to: Re($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.9#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Re"
}
}
}
},
"positions" : [ ],
"includes" : [ "a", "\\Re(a)>0" ],
"isPartOf" : [ "\\Re(a)>0\\wedge\\Re(s)<0\\wedge z<1", "\\Re(a)>0\\wedge\\Re(s)>0\\wedge z<1\\vee\\Re(a)>0\\wedge\\Re(s)>1\\wedge z=1", "\\Re(a)>0", "\\Re(a)>0\\wedge |z|<1" ],
"definiens" : [ ]
}