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 \begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6 \end{Bmatrix} \sim \frac{1}{\sqrt{12 \pi |V|}} \cos{\left( \sum_{i=1}^{6} J_i \theta_i +\frac{\pi}{4}\right)}. }

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

Semantic latex: \Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6} \sim \frac{1}{\sqrt{12 \cpi|V|}} \cos{(\sum_{i=1}^{6} J_i \theta_i + \frac{\cpi}{4})}

Confidence: 0.68720618419147

Mathematica

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_22387b48e60d1f91d79a8a94c5181041",
  "formula" : "\\begin{Bmatrix}\nj_1 & j_2 & j_3\\\\\nj_4 & j_5 & j_6\n\\end{Bmatrix}\n\\sim \\frac{1}{\\sqrt{12 \\pi |V|}} \\cos{\\left( \\sum_{i=1}^{6} J_i \\theta_i +\\frac{\\pi}{4}\\right)}",
  "semanticFormula" : "\\Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6} \\sim \\frac{1}{\\sqrt{12 \\cpi|V|}} \\cos{(\\sum_{i=1}^{6} J_i \\theta_i + \\frac{\\cpi}{4})}",
  "confidence" : 0.687206184191471,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) No translation possible for given token: Cannot extract information from feature set: \\sim [\\sim]"
        }
      },
      "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) No translation possible for given token: Cannot extract information from feature set: \\Wignersixjsym [\\Wignersixjsym]"
        }
      },
      "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) No translation possible for given token: Cannot extract information from feature set: \\Wignersixjsym [\\Wignersixjsym]"
        }
      },
      "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" : [ ],
  "includes" : [ "j_{3}", "\\theta_{i}", "\\begin{Bmatrix}j_1 & j_2 & j_3\\\\j_4 & j_5 & j_6\\end{Bmatrix}\\sim \\frac{1}{\\sqrt{12 \\pi |V|}} \\cos{\\left( \\sum_{i=1}^{6} J_i \\theta_i +\\frac{\\pi}{4}\\right)}", "m_{i}", "j", "J_{i}", "V", "\\begin{Bmatrix}    j_1 & j_2 & j_3\\\\    j_4 & j_5 & j_6 \\end{Bmatrix}" ],
  "isPartOf" : [ "\\begin{Bmatrix}j_1 & j_2 & j_3\\\\j_4 & j_5 & j_6\\end{Bmatrix}\\sim \\frac{1}{\\sqrt{12 \\pi |V|}} \\cos{\\left( \\sum_{i=1}^{6} J_i \\theta_i +\\frac{\\pi}{4}\\right)}" ],
  "definiens" : [ ]
}

Specify your own input