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 P_n(x) = c_n \, \det \begin{bmatrix}m_0 & m_1 & m_2 &\cdots & m_n \\m_1 & m_2 & m_3 &\cdots & m_{n+1} \\&&\vdots&& \vdots \\m_{n-1} &m_n& m_{n+1} &\cdots &m_{2n-1}\\1 & x & x^2 & \cdots & x^n\end{bmatrix}}

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

Semantic latex: P_n(x) = c_n \det \begin{bmatrix}m_0 & m_1 & m_2 &\cdots & m_n \\m_1 & m_2 & m_3 &\cdots & m_{n+1} \\&&\vdots&& \vdots \\m_{n-1} &m_n& m_{n+1} &\cdots &m_{2n-1}\\1 & x & x^2 & \cdots & x^n\end{bmatrix}

Confidence: 0

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) No translation possible for given token: No translation available for the operator \det [\det]

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: No translation available for the operator \det [\det]

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) No translation possible for given token: No translation available for the operator \det [\det]

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

  • Failed to parse (syntax error): {\displaystyle +1}}
  • Failed to parse (syntax error): {\displaystyle -1}\\1}
  • Failed to parse (syntax error): {\displaystyle +1} }

Complete translation information:

{
  "id" : "FORMULA_d0fee09ffd9c513dfff63f0bd3882fc2",
  "formula" : "P_n(x) = c_n  \\det \\begin{bmatrix}m_0 & m_1 &  m_2 &\\cdots & m_n \\\\m_1 & m_2 &  m_3 &\\cdots & m_{n+1} \\\\&&\\vdots&& \\vdots \\\\m_{n-1} &m_n& m_{n+1} &\\cdots &m_{2n-1}\\\\1 & x & x^2 & \\cdots & x^n\\end{bmatrix}",
  "semanticFormula" : "P_n(x) = c_n  \\det \\begin{bmatrix}m_0 & m_1 &  m_2 &\\cdots & m_n \\\\m_1 & m_2 &  m_3 &\\cdots & m_{n+1} \\\\&&\\vdots&& \\vdots \\\\m_{n-1} &m_n& m_{n+1} &\\cdots &m_{2n-1}\\\\1 & x & x^2 & \\cdots & x^n\\end{bmatrix}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) No translation possible for given token: No translation available for the operator \\det [\\det]"
        }
      },
      "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: No translation available for the operator \\det [\\det]"
        }
      },
      "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: No translation available for the operator \\det [\\det]"
        }
      },
      "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" : [ "+1}", "^2", "-1}\\\\1", "+1} " ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input