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 (x,\, y) = (a \cos t,\, b \sin t),\ 0 \le t < 2\pi\ .}
... is translated to the CAS output ...
Semantic latex: (x , y) =(a \cos t , b \sin t) , 0 \le t < 2 \cpi
Confidence: 0
Mathematica
Translation: (x , y) == (a*Cos[t], b*Sin[t]) 0 <= t < 2*Pi
Information
Sub Equations
- (a*Cos[t], b*Sin[t])
0 <= t
Free variables
- a
- b
- t
- x
- y
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: Cos[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 Mathematica: https://reference.wolfram.com/language/ref/Cos.html
- Pi was translated to: Pi
- Sine; Example: \sin@@{z}
Will be translated to: Sin[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Mathematica: https://reference.wolfram.com/language/ref/Sin.html
Tests
Symbolic
Numeric
SymPy
Translation: (x , y) == (a*cos(t), b*sin(t)) 0 <= t < 2*pi
Information
Sub Equations
- (a*cos(t), b*sin(t))
0 <= t
Free variables
- a
- b
- t
- x
- y
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: cos($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#cos
- Pi was translated to: pi
- Sine; Example: \sin@@{z}
Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin
Tests
Symbolic
Numeric
Maple
Translation: (x , y) = (a*cos(t), b*sin(t)); 0 <= t < 2*Pi
Information
Sub Equations
- (a*cos(t), b*sin(t)); 0 <= t
Free variables
- a
- b
- t
- x
- y
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: cos($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=cos
- Pi was translated to: Pi
- Sine; Example: \sin@@{z}
Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_25ccd1e9ab45f78476081085ce0c1562",
"formula" : "(x, y) = (a \\cos t, b \\sin t),0 \\le t < 2\\pi",
"semanticFormula" : "(x , y) =(a \\cos t , b \\sin t) , 0 \\le t < 2 \\cpi",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "(x , y) == (a*Cos[t], b*Sin[t])\n 0 <= t < 2*Pi",
"translationInformation" : {
"subEquations" : [ "(a*Cos[t], b*Sin[t])\n 0 <= t" ],
"freeVariables" : [ "a", "b", "t", "x", "y" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: Cos[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nMathematica: https://reference.wolfram.com/language/ref/Cos.html",
"\\cpi" : "Pi was translated to: Pi",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: Sin[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nMathematica: https://reference.wolfram.com/language/ref/Sin.html"
}
}
},
"SymPy" : {
"translation" : "(x , y) == (a*cos(t), b*sin(t))\n 0 <= t < 2*pi",
"translationInformation" : {
"subEquations" : [ "(a*cos(t), b*sin(t))\n 0 <= t" ],
"freeVariables" : [ "a", "b", "t", "x", "y" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: cos($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#cos",
"\\cpi" : "Pi was translated to: pi",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin"
}
}
},
"Maple" : {
"translation" : "(x , y) = (a*cos(t), b*sin(t)); 0 <= t < 2*Pi",
"translationInformation" : {
"subEquations" : [ "(a*cos(t), b*sin(t)); 0 <= t" ],
"freeVariables" : [ "a", "b", "t", "x", "y" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: cos($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=cos",
"\\cpi" : "Pi was translated to: Pi",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin"
}
}
}
},
"positions" : [ ],
"includes" : [ "(a\\cos t,\\, b\\sin t)", "b", "(x,y)", "a", "\\cos t", "(x,\\, y)", "y", "t", "x", "\\sin t", "\\pi", "(x,\\, y) = (a \\cos t,\\, b \\sin t),\\ 0 \\le t < 2\\pi" ],
"isPartOf" : [ "(x,\\, y) = (a \\cos t,\\, b \\sin t),\\ 0 \\le t < 2\\pi" ],
"definiens" : [ ]
}