LaTeX to CAS translator

Jump to navigation Jump to search

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 \theta}

... is translated to the CAS output ...

Semantic latex: \theta

Confidence: 0

Mathematica

Translation: \[Theta]

Information

Sub Equations

  • \[Theta]

Free variables

  • \[Theta]

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('theta')

Information

Sub Equations

  • Symbol('theta')

Free variables

  • Symbol('theta')

Tests

Symbolic
Numeric

Maple

Translation: theta

Information

Sub Equations

  • theta

Free variables

  • theta

Tests

Symbolic
Numeric

Dependency Graph Information

Is part of

  • Failed to parse (syntax error): {\displaystyle \frac{1 + m_1 m_2}{m_2 - m_1} = \cot\theta\}

Description

  • angle
  • angular coordinate
  • center
  • formula
  • rotation angle
  • affine transformation of the coordinate
  • angle from the positive horizontal axis
  • canonical equation
  • canonical form parameter
  • ellipse 's major axis
  • expression
  • general equation 's coefficient
  • general form coefficient by the equation
  • semi-major axis
  • semi-minor axis
  • quotient
  • ellipse 's equation
  • major axis
  • ellipse
  • order
  • circumference
  • function of the usual angle measure
  • general case of an ellipse
  • length of the semi-major axis
  • origin at the center
  • polar coordinate
  • polar form
  • angle by a degree
  • complete elliptic integral of the second kind
  • direction
  • eccentricity
  • elementary function
  • focus
  • other focus at angular coordinate
  • point towards the center
  • polar coordinate with the origin
  • q-analog angle measure
  • radian
  • reference direction
  • sign in the denominator
  • focus at the origin
  • function
  • point
  • line with equation
  • family of ellipsis
  • following measurement
  • measure

Complete translation information:

{
  "id" : "FORMULA_2554a2bb846cffd697389e5dc8912759",
  "formula" : "\\theta",
  "semanticFormula" : "\\theta",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[Theta]",
      "translationInformation" : {
        "subEquations" : [ "\\[Theta]" ],
        "freeVariables" : [ "\\[Theta]" ]
      },
      "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" : "Symbol('theta')",
      "translationInformation" : {
        "subEquations" : [ "Symbol('theta')" ],
        "freeVariables" : [ "Symbol('theta')" ]
      },
      "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" : "theta",
      "translationInformation" : {
        "subEquations" : [ "theta" ],
        "freeVariables" : [ "theta" ]
      },
      "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" : 9,
    "sentence" : 4,
    "word" : 25
  }, {
    "section" : 14,
    "sentence" : 0,
    "word" : 18
  }, {
    "section" : 15,
    "sentence" : 2,
    "word" : 2
  }, {
    "section" : 28,
    "sentence" : 2,
    "word" : 12
  } ],
  "includes" : [ ],
  "isPartOf" : [ "\\begin{align}  A &=   a^2 \\sin^2\\theta + b^2 \\cos^2\\theta \\\\  B &=  2\\left(b^2 - a^2\\right) \\sin\\theta \\cos\\theta \\\\  C &=   a^2 \\cos^2\\theta + b^2 \\sin^2\\theta \\\\  D &= -2A x_\\circ   -  B y_\\circ \\\\  E &= - B x_\\circ   - 2C y_\\circ \\\\  F &=   A x_\\circ^2 +  B x_\\circ y_\\circ + C y_\\circ^2 - a^2 b^2.\\end{align}", "\\begin{align}  x &=  \\left(X - x_\\circ\\right) \\cos\\theta + \\left(Y - y_\\circ\\right) \\sin\\theta \\\\  y &= -\\left(X - x_\\circ\\right) \\sin\\theta + \\left(Y - y_\\circ\\right) \\cos\\theta.\\end{align}", "\\begin{align}  a, b    &= \\frac{-\\sqrt{2 \\Big(A E^2 + C D^2 - B D E + (B^2 - 4 A C) F\\Big)\\left((A + C) \\pm \\sqrt{(A - C)^2 + B^2}\\right)}}{B^2 - 4 A C} \\\\  x_\\circ  &= \\frac{2CD - BE}{B^2 - 4AC} \\\\[3pt]  y_\\circ  &= \\frac{2AE - BD}{B^2 - 4AC} \\\\[3pt]    \\theta &= \\begin{cases}                \\arctan\\left(\\frac{1}{B}\\left(C - A - \\sqrt{(A - C)^2 + B^2}\\right)\\right)                         & \\text{for } B \\ne 0 \\\\                       0 & \\text{for } B = 0,\\ A < C \\\\                90^\\circ & \\text{for } B = 0,\\ A > C \\\\              \\end{cases}\\end{align}", "r(\\theta) = \\frac{ab}{\\sqrt{(b \\cos \\theta)^2 + (a\\sin \\theta)^2}}=\\frac{b}{\\sqrt{1 - (e\\cos\\theta)^2}}", "\\theta = 0", "r(\\theta)=\\frac{a (1-e^2)}{1 \\pm e\\cos\\theta}", "r=\\frac{a (1-e^2)}{1 - e\\cos(\\theta - \\phi)}", "\\frac{1 + m_1 m_2}{m_2 - m_1} = \\cot\\theta\\", "\\theta:", "C \\,=\\, 4a\\int_0^{\\pi/2}\\sqrt {1 - e^2 \\sin^2\\theta}\\ d\\theta \\,=\\, 4 a \\,E(e)", "E(e) \\,=\\, \\int_0^{\\pi/2}\\sqrt {1 - e^2 \\sin^2\\theta}\\ d\\theta" ],
  "definiens" : [ {
    "definition" : "angle",
    "score" : 0.8039148947084266
  }, {
    "definition" : "angular coordinate",
    "score" : 0.7975333247310152
  }, {
    "definition" : "center",
    "score" : 0.7827687341984797
  }, {
    "definition" : "formula",
    "score" : 0.7827687341984797
  }, {
    "definition" : "rotation angle",
    "score" : 0.722
  }, {
    "definition" : "affine transformation of the coordinate",
    "score" : 0.6896778755706364
  }, {
    "definition" : "angle from the positive horizontal axis",
    "score" : 0.6896778755706364
  }, {
    "definition" : "canonical equation",
    "score" : 0.6896778755706364
  }, {
    "definition" : "canonical form parameter",
    "score" : 0.6896778755706364
  }, {
    "definition" : "ellipse 's major axis",
    "score" : 0.6896778755706364
  }, {
    "definition" : "expression",
    "score" : 0.6896778755706364
  }, {
    "definition" : "general equation 's coefficient",
    "score" : 0.6896778755706364
  }, {
    "definition" : "general form coefficient by the equation",
    "score" : 0.6896778755706364
  }, {
    "definition" : "semi-major axis",
    "score" : 0.6896778755706364
  }, {
    "definition" : "semi-minor axis",
    "score" : 0.6896778755706364
  }, {
    "definition" : "quotient",
    "score" : 0.4328619939524455
  }, {
    "definition" : "ellipse 's equation",
    "score" : 0.40617210308498164
  }, {
    "definition" : "major axis",
    "score" : 0.40617210308498164
  }, {
    "definition" : "ellipse",
    "score" : 0.3970721724437041
  }, {
    "definition" : "order",
    "score" : 0.3751459896300362
  }, {
    "definition" : "circumference",
    "score" : 0.34586835176111275
  }, {
    "definition" : "function of the usual angle measure",
    "score" : 0.34586835176111275
  }, {
    "definition" : "general case of an ellipse",
    "score" : 0.34586835176111275
  }, {
    "definition" : "length of the semi-major axis",
    "score" : 0.34586835176111275
  }, {
    "definition" : "origin at the center",
    "score" : 0.34586835176111275
  }, {
    "definition" : "polar coordinate",
    "score" : 0.34586835176111275
  }, {
    "definition" : "polar form",
    "score" : 0.34586835176111275
  }, {
    "definition" : "angle by a degree",
    "score" : 0.31917846089364893
  }, {
    "definition" : "complete elliptic integral of the second kind",
    "score" : 0.31917846089364893
  }, {
    "definition" : "direction",
    "score" : 0.31917846089364893
  }, {
    "definition" : "eccentricity",
    "score" : 0.31917846089364893
  }, {
    "definition" : "elementary function",
    "score" : 0.31917846089364893
  }, {
    "definition" : "focus",
    "score" : 0.31917846089364893
  }, {
    "definition" : "other focus at angular coordinate",
    "score" : 0.31917846089364893
  }, {
    "definition" : "point towards the center",
    "score" : 0.31917846089364893
  }, {
    "definition" : "polar coordinate with the origin",
    "score" : 0.31917846089364893
  }, {
    "definition" : "q-analog angle measure",
    "score" : 0.31917846089364893
  }, {
    "definition" : "radian",
    "score" : 0.31917846089364893
  }, {
    "definition" : "reference direction",
    "score" : 0.31917846089364893
  }, {
    "definition" : "sign in the denominator",
    "score" : 0.31917846089364893
  }, {
    "definition" : "focus at the origin",
    "score" : 0.2793445205626417
  }, {
    "definition" : "function",
    "score" : 0.2793445205626417
  }, {
    "definition" : "point",
    "score" : 0.2793445205626417
  }, {
    "definition" : "line with equation",
    "score" : 0.23933260810146667
  }, {
    "definition" : "family of ellipsis",
    "score" : 0.23208734080327384
  }, {
    "definition" : "following measurement",
    "score" : 0.23208734080327384
  }, {
    "definition" : "measure",
    "score" : 0.23208734080327384
  } ]
}

Specify your own input