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{pmatrix} j_1 & j_2 & j_3 \\ m_1 & m_2 & m_3 \end{pmatrix} \equiv \frac{(-1)^{j_1 - j_2 - m_3}}{\sqrt{2 j_3 + 1}} \langle j_1 \, m_1 \, j_2 \, m_2 | j_3 \, (-m_3) \rangle. }

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

Semantic latex: \Wignerthreejsym{j_1}{j_2}{j_3}{m_1}{m_2}{m_3} \equiv \frac{(-1)^{j_1 - j_2 - m_3}}{\sqrt{2 j_3 + 1}} \langle j_1 m_1 j_2 m_2|j_3(- m_3) \rangle

Confidence: 0.66574040393935

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) The input LaTeX is invalid: Unable to retrieve argument of the function Subscript[j, 1]

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_12416bda9081be03adcaf1363ceb3516",
  "formula" : "\\begin{pmatrix}\n    j_1 & j_2 & j_3 \\\\\n    m_1 & m_2 & m_3\n  \\end{pmatrix}\n  \\equiv\n  \\frac{(-1)^{j_1 - j_2 - m_3}}{\\sqrt{2 j_3 + 1}}\n    \\langle j_1  m_1  j_2  m_2 | j_3  (-m_3) \\rangle",
  "semanticFormula" : "\\Wignerthreejsym{j_1}{j_2}{j_3}{m_1}{m_2}{m_3} \\equiv \\frac{(-1)^{j_1 - j_2 - m_3}}{\\sqrt{2 j_3 + 1}} \\langle j_1 m_1 j_2 m_2|j_3(- m_3) \\rangle",
  "confidence" : 0.6657404039393544,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) The input LaTeX is invalid: Unable to retrieve argument of the function Subscript[j, 1]"
        }
      },
      "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: \\Wignerthreejsym [\\Wignerthreejsym]"
        }
      },
      "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: \\Wignerthreejsym [\\Wignerthreejsym]"
        }
      },
      "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_{2}", "j_{3}", "j_{1}", "m_{3}", "\\begin{pmatrix}    j_1 & j_2 & j_3 \\\\    m_1 & m_2 & m_3  \\end{pmatrix}  \\equiv  \\frac{(-1)^{j_1 - j_2 - m_3}}{\\sqrt{2 j_3 + 1}}    \\langle j_1 \\, m_1 \\, j_2 \\, m_2 | j_3 \\, (-m_3) \\rangle", "j", "m_{2}", "m_{1}", "m" ],
  "isPartOf" : [ "\\begin{pmatrix}    j_1 & j_2 & j_3 \\\\    m_1 & m_2 & m_3  \\end{pmatrix}  \\equiv  \\frac{(-1)^{j_1 - j_2 - m_3}}{\\sqrt{2 j_3 + 1}}    \\langle j_1 \\, m_1 \\, j_2 \\, m_2 | j_3 \\, (-m_3) \\rangle" ],
  "definiens" : [ ]
}

Specify your own input