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 \frac{1}{\left| \mathbf{x}-\mathbf{x}' \right|} = \frac{1}{\sqrt{r^2+{r'}^2-2r{r'}\cos\gamma}} = \sum_{\ell=0}^\infty \frac{{r'}^\ell}{r^{\ell+1}} P_\ell(\cos \gamma)}
... is translated to the CAS output ...
Semantic latex: \frac{1}{|\mathbf{x} - \mathbf{x} '|} = \frac{1}{\sqrt{r^2+{r'}^2-2r{r'}\cos\gamma}} = \sum_{\ell=0}^\infty \frac{{r'}^\ell}{r^{\ell+1}} P_\ell(\cos \gamma)
Confidence: 0
Mathematica
Translation:
Information
Symbol info
- (LaTeX -> Mathematica) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places.
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places.
Tests
Symbolic
Numeric
Maple
Translation:
Information
Symbol info
- (LaTeX -> Maple) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places.
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
- Failed to parse (syntax error): {\displaystyle '}^2-}
- Failed to parse (syntax error): {\displaystyle =0}^}
- Failed to parse (syntax error): {\displaystyle {1}{|}
Description
- r
- cos
- ell
- gamma
- mathbf
- x
- TeX Source
- 2r
- Formula
- frac
- frac p
- Gold ID
- infty
- link
- sqrt
- sum
Complete translation information:
{
"id" : "FORMULA_8646bd0d06e9454aaa39dfc506fe54f7",
"formula" : "\\frac{1}{\\left| \\mathbf{x}-\\mathbf{x}' \\right|} = \\frac{1}{\\sqrt{r^2+{r'}^2-2r{r'}\\cos\\gamma}} = \\sum_{\\ell=0}^\\infty \\frac{{r'}^\\ell}{r^{\\ell+1}} P_\\ell(\\cos \\gamma)",
"semanticFormula" : "\\frac{1}{|\\mathbf{x} - \\mathbf{x} '|} = \\frac{1}{\\sqrt{r^2+{r'}^2-2r{r'}\\cos\\gamma}} = \\sum_{\\ell=0}^\\infty \\frac{{r'}^\\ell}{r^{\\ell+1}} P_\\ell(\\cos \\gamma)",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> Mathematica) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places."
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"SymPy" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places."
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"Maple" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> Maple) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places."
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
}
},
"positions" : [ {
"section" : 1,
"sentence" : 0,
"word" : 8
} ],
"includes" : [ "^2+", "'}^2-", "=0}^", "{1}{|" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "r",
"score" : 0.8778488971362923
}, {
"definition" : "cos",
"score" : 0.8109257785506973
}, {
"definition" : "ell",
"score" : 0.8109257785506973
}, {
"definition" : "gamma",
"score" : 0.8109257785506973
}, {
"definition" : "mathbf",
"score" : 0.8109257785506973
}, {
"definition" : "x",
"score" : 0.8109257785506973
}, {
"definition" : "TeX Source",
"score" : 0.722
}, {
"definition" : "2r",
"score" : 0.6558252862904742
}, {
"definition" : "Formula",
"score" : 0.6558252862904742
}, {
"definition" : "frac",
"score" : 0.6558252862904742
}, {
"definition" : "frac p",
"score" : 0.6558252862904742
}, {
"definition" : "Gold ID",
"score" : 0.6558252862904742
}, {
"definition" : "infty",
"score" : 0.6558252862904742
}, {
"definition" : "link",
"score" : 0.6558252862904742
}, {
"definition" : "sqrt",
"score" : 0.6558252862904742
}, {
"definition" : "sum",
"score" : 0.6558252862904742
} ]
}