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 \operatorname{sl}(r)=s}

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

Semantic latex: \operatorname{sl}(r)=s

Confidence: 0

Mathematica

Translation: sl[r] == s

Information

Sub Equations

  • sl[r] = s

Free variables

  • r
  • s

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.

Tests

Symbolic

Test expression: (sl[r])-(s)

ERROR:

{
    "result": "ERROR",
    "testTitle": "Simple",
    "testExpression": null,
    "resultExpression": null,
    "wasAborted": false,
    "conditionallySuccessful": false
}
Numeric

SymPy

Translation: sl(r) == s

Information

Sub Equations

  • sl(r) = s

Free variables

  • r
  • s

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.

Tests

Symbolic
Numeric

Maple

Translation: sl(r) = s

Information

Sub Equations

  • sl(r) = s

Free variables

  • r
  • s

Symbol info

  • Was interpreted as a function call because of a leading \operatorname.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Complete translation information:

{
  "id" : "FORMULA_fe7e0f0348de8335a4e4b49b230e1ee0",
  "formula" : "\\operatorname{sl}(r)=s",
  "semanticFormula" : "\\operatorname{sl}(r)=s",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "sl[r] == s",
      "translationInformation" : {
        "subEquations" : [ "sl[r] = s" ],
        "freeVariables" : [ "r", "s" ],
        "tokenTranslations" : {
          "sl" : "Was interpreted as a function call because of a leading \\operatorname."
        }
      },
      "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" : "sl[r]",
          "rhs" : "s",
          "testExpression" : "(sl[r])-(s)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "sl(r) == s",
      "translationInformation" : {
        "subEquations" : [ "sl(r) = s" ],
        "freeVariables" : [ "r", "s" ],
        "tokenTranslations" : {
          "sl" : "Was interpreted as a function call because of a leading \\operatorname."
        }
      }
    },
    "Maple" : {
      "translation" : "sl(r) = s",
      "translationInformation" : {
        "subEquations" : [ "sl(r) = s" ],
        "freeVariables" : [ "r", "s" ],
        "tokenTranslations" : {
          "sl" : "Was interpreted as a function call because of a leading \\operatorname."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 1,
    "word" : 4
  } ],
  "includes" : [ "sl", "r", "s" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input