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 G\left(\frac12\right) = 2^{\frac{1}{24}} e^{\frac32 \zeta'(-1)}\pi^{-\frac14}.}

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

Semantic latex: \BarnesG@{\frac12} = 2^{\frac{1}{24}} \expe^{\frac32 \zeta'(-1)} \cpi^{-\frac14}

Confidence: 0.72606363917343

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) No translation possible for given token: Cannot extract information from feature set: \BarnesG [\BarnesG]

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \BarnesG [\BarnesG]

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Complete translation information:

{
  "id" : "FORMULA_be0ff70a6b99960c94e622fad3081660",
  "formula" : "G\\left(\\frac12\\right) = 2^{\\frac{1}{24}} e^{\\frac32 \\zeta'(-1)}\\pi^{-\\frac14}",
  "semanticFormula" : "\\BarnesG@{\\frac12} = 2^{\\frac{1}{24}} \\expe^{\\frac32 \\zeta'(-1)} \\cpi^{-\\frac14}",
  "confidence" : 0.7260636391734279,
  "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."
        }
      }
    },
    "SymPy" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\BarnesG [\\BarnesG]"
        }
      }
    },
    "Maple" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\BarnesG [\\BarnesG]"
        }
      }
    }
  },
  "positions" : [ {
    "section" : 2,
    "sentence" : 0,
    "word" : 0
  } ],
  "includes" : [ "G" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input