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 (\pm a,0)}

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

Semantic latex: (\pm a,0)

Confidence: 0

Mathematica

Translation: (\[PlusMinus]a , 0)

Information

Sub Equations

  • (+ a , 0)
  • (- a , 0)

Free variables

  • a

Symbol info

  • was translated to: \[PlusMinus]

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) An unknown or missing element occurred: Cannot translate operation \pm

Tests

Symbolic
Numeric

Maple

Translation: (&+- a , 0)

Information

Sub Equations

  • (+ a , 0)
  • (- a , 0)

Free variables

  • a

Symbol info

  • was translated to: &+-

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • vertex
  • center of curvature
  • Radius of curvature
  • representation
  • vertical tangent

Complete translation information:

{
  "id" : "FORMULA_f5db817b711918bc2e447c0d1ab99218",
  "formula" : "(\\pm a,0)",
  "semanticFormula" : "(\\pm a,0)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "(\\[PlusMinus]a , 0)",
      "translationInformation" : {
        "subEquations" : [ "(+ a , 0)", "(- a , 0)" ],
        "freeVariables" : [ "a" ],
        "tokenTranslations" : {
          "\\pm" : "was translated to: \\[PlusMinus]"
        }
      },
      "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) An unknown or missing element occurred: Cannot translate operation \\pm"
        }
      },
      "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" : "(&+- a , 0)",
      "translationInformation" : {
        "subEquations" : [ "(+ a , 0)", "(- a , 0)" ],
        "freeVariables" : [ "a" ],
        "tokenTranslations" : {
          "\\pm" : "was translated to: &+-"
        }
      },
      "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" : 38,
    "sentence" : 1,
    "word" : 9
  } ],
  "includes" : [ "(\\pm a,\\, 0)", "a", "a,\\, b", "a,b", "a,\\; b" ],
  "isPartOf" : [ "(\\pm a,\\, 0)" ],
  "definiens" : [ {
    "definition" : "vertex",
    "score" : 0.8083963513006062
  }, {
    "definition" : "center of curvature",
    "score" : 0.6687181434333315
  }, {
    "definition" : "Radius of curvature",
    "score" : 0.6288842031023242
  }, {
    "definition" : "representation",
    "score" : 0.3249086196238076
  }, {
    "definition" : "vertical tangent",
    "score" : 0.3249086196238076
  } ]
}

Specify your own input