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 w_{i} = \frac{1}{p'_{n}(x_{i})}\int_{a}^{b}\omega(x)\frac{p_{n}(x)}{x-x_{i}}dx}

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

Semantic latex: w_{i} = \frac{1}{p'_{n}(x_{i})} \int_{a}^{b} \omega(x) \frac{p_{n}(x)}{x-x_{i}} \diff{x}

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

Description

  • n
  • p
  • TeX source
  • dx
  • Formula
  • frac
  • Gold ID
  • int
  • link
  • omega
  • x
  • x-x

Complete translation information:

{
  "id" : "FORMULA_8c49145544fca24efb8de07eb1275c09",
  "formula" : "w_{i} = \\frac{1}{p'_{n}(x_{i})}\\int_{a}^{b}\\omega(x)\\frac{p_{n}(x)}{x-x_{i}}dx",
  "semanticFormula" : "w_{i} = \\frac{1}{p'_{n}(x_{i})} \\int_{a}^{b} \\omega(x) \\frac{p_{n}(x)}{x-x_{i}} \\diff{x}",
  "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" : [ ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "n",
    "score" : 0.8097525794913764
  }, {
    "definition" : "p",
    "score" : 0.8097525794913764
  }, {
    "definition" : "TeX source",
    "score" : 0.722
  }, {
    "definition" : "dx",
    "score" : 0.6820376639304249
  }, {
    "definition" : "Formula",
    "score" : 0.655347773062961
  }, {
    "definition" : "frac",
    "score" : 0.655347773062961
  }, {
    "definition" : "Gold ID",
    "score" : 0.655347773062961
  }, {
    "definition" : "int",
    "score" : 0.655347773062961
  }, {
    "definition" : "link",
    "score" : 0.655347773062961
  }, {
    "definition" : "omega",
    "score" : 0.655347773062961
  }, {
    "definition" : "x",
    "score" : 0.655347773062961
  }, {
    "definition" : "x-x",
    "score" : 0.655347773062961
  } ]
}

Specify your own input